2020-02-02 15:42:41 +01:00
|
|
|
augroup templates
|
|
|
|
au!
|
|
|
|
" read in template files
|
|
|
|
autocmd BufNewFile *.* silent! execute '0r $HOME/.vim/templates/skeleton.'.expand("<afile>:e")
|
2019-06-22 19:27:02 +02:00
|
|
|
|
2020-02-02 15:42:41 +01:00
|
|
|
" parse special text in the templates after the read
|
2020-05-22 01:39:09 +02:00
|
|
|
autocmd BufNewFile * %s#\[:VIM_EVAL:\]\(.\{-\}\)\[:END_EVAL:\]#\=eval(submatch(1))#ge
|
2020-02-02 15:42:41 +01:00
|
|
|
augroup END
|