tibabit / vim-templates

create files from templates
https://tibabit.github.io/vim-templates/
MIT License
73 stars 30 forks source link

Expanding bug for CMakeLists.txt #21

Open jackhub opened 2 years ago

jackhub commented 2 years ago

When edit a cmake file, it expands for :e CMakeLists.txt but not for :e build/CMakeLists.txt.

Even manually call :TemplateAutoInit, it still not works.

image
jackhub commented 2 years ago

Change one line of code fix this, plugin/templates.vim, line 275.

From let l:fileparts = add(l:fileparts, expand('%')) " full file name To: let l:fileparts = add(l:fileparts, expand('%:t')) " file tail

Don't know why here need a 'full file name'.