Using gnu global in vim with file / folder name contains space

I have been using gnu globals (cscope type tag system) to track my c / cpp code for a long time, however I am running into a problem where there are spaces in the folder / file name.

For example, in my pj1 project, I use " :cs fs foo

" to find all " foo

":

pj1/s pace.cpp

and pj1/ok.cpp

have the function foo()

:

int foo()
{
}

      

vim will open a list like this:

Cscope tag: foo                                            
   #   line  filename / context / line
   1      1  ok.cpp <<foo>>
             int foo()
   2      1  s%20pace.cpp <<foo>>
             int foo()

      

note that the space was converted to " %20

", so when I select 2 to open the location, it gets an error:

E429: File "s% 20pace.cpp" does not exist

does anyone know how to solve this problem?

+3


source to share





All Articles