vim-template
vim-template copied to clipboard
expand %FILE% improperly
I touch a .vim-template:.md template file and want to expand %FILE% in file start, then I touch a new md file
:new 2.66.md
I found %FILIE% expanded to 2 instead of 2.66
I check the source
https://github.com/aperezdc/vim-template/blob/master/plugin/templates.vim#L344-L367
why L344 code use :r 3 times
let l:filen = expand("%:t:r:r:r")
This is due to commit 1a366e908f9a622165cd0fbb80a4821068736661 (see PR #56). I am not sure if we can fix this issue in a sane way without reverting that.
@jagu-sayan: Any thoughts on this?