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

Git can't handle linux symlinks in windows,So I can't use .c template for .cpp

Open blueyi opened this issue 9 years ago • 3 comments

How can I configure vim-template to make me use the .c and .cpp file in one template in windows.Now in my windows os, when I create a new .cpp file I got like this 1 2

Thank you for your help!

blueyi avatar Oct 14 '15 07:10 blueyi

Here's some interesting discussion about how Git handle symlinks in Windows. TL;DR they are plain text files which contain the path to the target file and has mode 120000. If the git command is available, the plugin could use git ls-files -s to determine whether a file is a “symlink”, and follow it by reading the path from the file contents.

aperezdc avatar Jun 20 '16 17:06 aperezdc

Has anyone worked on it ? I just installed vim-template on my Windows 10 machine and got the same issue.

WillyKaze avatar Mar 03 '17 16:03 WillyKaze

@WillyKaze: As a workaround, you can manually copy the pointed-to files over the symlinks and things will work. Alternatively, you can provide also your own templates by setting the g:templates_directory option.

I think most people contributing to the code (including myself) do not use Windows. That being said, I would greatly appreciate if some Windows developer/user would send a PR that we could merge.

aperezdc avatar Mar 03 '17 17:03 aperezdc