I have used gnu global tags (a tag system like cscope) to trace my c/cpp code for a long time, however, I encounter a problem when there are spaces in folder/file name.
For example, in my project pj1, I use ":cs f s foo
" to find all "foo
":
pj1/s pace.cpp
and pj1/ok.cpp
both have a foo()
function:
int foo()
{
}
vim will open a list like that:
Cscope tag: foo
# line filename / context / line
1 1 ok.cpp <<foo>>
int foo()
2 1 s%20pace.cpp <<foo>>
int foo()
notice that the space have been converted to "%20
", so when I choose 2 to open the location, it will get an error:
E429: File "s%20pace.cpp" does not exist
anyone knows how to solve this problem?