gf
: go file- e.g. put cursor on the filename (#include "filename.h")
Ctrl + o
: jump back
*
: search same wordn
/N
: next/previous one
- Stackoverflow - Jump to function definition in vim
- Vim Tips Wiki - Go to definition using g
- Stackoverflow - How to jump to the beginning of the current function body in Vim?
this support function and symbol
Install ctags
sudo apt-get install ctags
Usage
On the top of the directory type
ctags -R
this will generate a tag file
In VIM you can use the key combination
Ctrl + ]
: go to definationCtrl + t
: back to previous tag
- taglist
- tagbar
- Ctrlp
grep -inr keyword *
-i
: case-insensitive-n
: prefix output with line numbers-r
: recurse subdirectories
find . -name *.c | xargs grep -rn keyword