Describe the bug
I have set the tag file path with a absolute path, but gvim can't not find it.
To Reproduce
Detailed steps to reproduce the behavior:
:setl tags+=C:\Users\zoumi\.cache\HYtags,tags
echo filereadable('C:\Users\zoumi\.cache\HYtags')
echo tagfiles() "return 1
Expected behavior
echo tagfiles() should get ['C:\Users\zoumi.cache\HYtags'], but it return []
Environment (please complete the following information):
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 13 2021 22:02:46)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-2994
Compiled by appveyor@APPVYR-WIN
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Untested but try to double the backslashes:
:setl tags+=C:\\Users\\zoumi\\.cache\\HYtags,tags
^^ ^^ ^^ ^^
Or use :let:
:let &l:tags = &l:tags .. ',' .. 'C:\Users\zoumi\.cache\HYtags,tags'
See :h option-backslash.
:setl tags+=C:\Users\zoumi\.cache\HYtags,tags
and
:setl tags+=C:\\Users\\zoumi\\.cache\\HYtags,tags
both get:
echo &tags:
C:\Users\zoumi.cache\HYtags,tags
Ah right. On Windows, backslashes are not removed contrary to Linux:
For Win32 backslashes in file names are mostly not removed. More precise: For
options that expect a file name (those where environment variables are
expanded) a backslash before a normal file name character is not removed. But
a backslash before a special character (space, backslash, comma, etc.) is used
like explained above.
@vim-ml I found it's because the dir name ".cache".If I change the name to "cache" it works.
I have set .gitignore to ignore all .* file, does this affects vim?
—
You are receiving this because you were mentioned.
So,is it a bug?
—
You are receiving this because you were mentioned.
It' because the plugin 'ZSaberLv0/ZFVimIgnore' set ".cache" in the wildignore option.
—
You are receiving this because you were mentioned.