vim-template icon indicating copy to clipboard operation
vim-template copied to clipboard

expand %FILE% improperly

Open DreamAndDead opened this issue 8 years ago • 1 comments

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")

DreamAndDead avatar Apr 13 '17 08:04 DreamAndDead

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?

aperezdc avatar Jun 22 '17 11:06 aperezdc