Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expand %FILE% improperly #116

Open
DreamAndDead opened this issue Apr 13, 2017 · 1 comment
Open

expand %FILE% improperly #116

DreamAndDead opened this issue Apr 13, 2017 · 1 comment
Labels

Comments

@DreamAndDead
Copy link

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")
@aperezdc aperezdc added the bug label Jun 22, 2017
@aperezdc
Copy link
Owner

This is due to commit 1a366e9 (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?

linuxcaffe added a commit to linuxcaffe/taskwiki-template that referenced this issue Aug 25, 2021
Stop %FILE% from having non-template extensions removed (fixes aperezdc#116)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants