Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 31. október 2026

Rozdiely pre vimconfig/vim/plugin/templatefile.vim medzi verziami 1.3 a 1.4

verzia 1.3, 2002/02/06 01:13:40 verzia 1.4, 2002/09/13 18:16:17
Riadok 5 
Riadok 5 
 " Last Change: 2002/02/05  " Last Change: 2002/02/05
 " Version: $Id$  " Version: $Id$
 " Thanks:  " Thanks:
 "               Scott Urban       : First version of templatefile.vim  "       Scott Urban:    First version of templatefile.vim
 "                                   http://vim.sourceforge.net/scripts/  "                               http://vim.sourceforge.net/scripts/script.php?script_id=198
 "                                          script.php?script_id=198  "       Roland Lezuo:   <roland.lezuo AT chello.at>
   "                       some suggestions
 "  "
 " Description:  " Description:
 "               Plugin load template file for new files  "               Plugin load template file for new files
Riadok 53  fun! LoadTemplateFile()
Riadok 54  fun! LoadTemplateFile()
   
         let date = strftime("%c")          let date = strftime("%c")
         let year = strftime("%Y")          let year = strftime("%Y")
         let cwd = getcwd()          let cwd  = getcwd()
         let lastdir = substitute(cwd, ".*/", "", "g")          let lastdir = substitute(cwd, ".*/", "", "g")
         let myfile = expand("%:t:r")          let myfile  = expand("%:t:r")
         let myfile_ext = expand("%")          let myfile_ext = expand("%")
           let myfile_ext = substitute(myfile_ext, "/", "@PATH_SEP@", "")
         let inc_gaurd = substitute(myfile, "\\.", "_", "g")          let inc_gaurd = substitute(myfile, "\\.", "_", "g")
         let inc_gaurd = toupper(inc_gaurd)          let inc_gaurd = toupper(inc_gaurd)
           let Author = g:author
           let Email  = g:email
         silent! execute "%s/@DATE@/" .  date . "/g"          silent! execute "%s/@DATE@/" .  date . "/g"
         silent! execute "%s/@YEAR@/" .  year . "/g"          silent! execute "%s/@YEAR@/" .  year . "/g"
         silent! execute "%s/@LASTDIR@/" .  lastdir . "/g"          silent! execute "%s/@LASTDIR@/"  .  lastdir    . "/g"
         silent! execute "%s/@FILE@/" .  myfile . "/g"          silent! execute "%s/@FILE@/"     .  myfile     . "/g"
         silent! execute "%s/@FILE_EXT@/" .  myfile_ext . "/g"          silent! execute "%s/@FILE_EXT@/" .  myfile_ext . "/g"
           silent! execute "%s/@PATH_SEP@/\\//g"
         silent! execute "%s/@INCLUDE_GAURD@/" . inc_gaurd . "/g"          silent! execute "%s/@INCLUDE_GAURD@/" . inc_gaurd . "/g"
           silent! execute "%s/@AUTHOR@/" . Author . "/g"
           silent! execute "%s/@EMAIL@/"  . Email  . "/g"
         if exists ("*" . template_func)          if exists ("*" . template_func)
                 if exists("g:load_templates")                  if exists("g:load_templates")
                         if g:load_templates == "ask"                          if g:load_templates == "ask"

Legend:
Odstranené z verzie1.3  
zmenené riadky
  Pridané vo verzii1.4

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok