I am using cscope to get familiar with all the keywords used in socket programming. I went to the directory with c files. I used cscope. and then I searched for AF_INET. I got t
To exit from cscope interactive prompt, type Ctrl-d
. If you just want to rebuild cscope's database, and not invoke cscope's interactive prompt, pass it the -b option. I usually invoke cscope as cscope -bcqR
.
As for jumping around in vim using cscope, it really depends on your vim config.
Most probably, jump to tag (Ctrl-]
) will use cscope first, then ctags (see :help cst
and :help csto
). Use Ctrl-T
to go back.
There are some useful mappings for cscope that you can find by typing :help cscope-suggestions
in vim. After adding those mappings to your .vimrc, you will be able to jump to symbols using Ctrl-_ s
, the calling function using Ctrl-_ c
, etc...
You can access vim's cscope documentation by typing :help cscope
.