Ctags
C Program reading Auxiliary tool . It's a lot of trouble to have to jump between files when looking at C + + code, which is ctags to solve this problem. Ctags is a tool for Linux, but it is used to generate tags files for vim, VIM can be used without additional plugins.
$ctags -R
In terminal, generate tags file
ctrl + ]
In vim, jump to the point where the cursor refers to the definition of the symbol, jump will have a stack record jump process, you can jump back
ctrl + t
In Vim, as opposed to the previous command, the bounce
Cscope
C Program reading Auxiliary tool . Cscope is often used in conjunction with ctags, a tool that knows where to invoke the current function, where it contains the current file, and thus jumps, which is its main function. But unlike Ctags, this tool does not provide a way to jump back. It can also be used to find the definition of a symbol, such as classes, functions, variables, and some non-core functions, please know for yourself.
cscope -Rbq
Generate Cscope related data files, typically 3
note that Cscope and ctags are different, VIM does not directly support it, so the need for VIM plug-in cscope.vim
, with Vundle Direct write Bundle ‘cscope.vim‘
, shortcut keys to see how you set up.
Very useful vim Plugin