Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for vimconfig/vim/plugin/templatefile.vim between version 1.3 and 1.4

version 1.3, 2002/02/06 01:13:40 version 1.4, 2002/09/13 18:16:17
Line 5 
Line 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
Line 53  fun! LoadTemplateFile()
Line 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:
Removed from v.1.3  
changed lines
  Added in v.1.4

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top