Sunday, August 23, 2009

Vim Cscope

1. Generate filelist
> find -name '*.c' > cscope.files
> find -name '*.h' >> cscope.files
> find -name '*.cc' >> cscope.files
> find -name '*.cpp' >> cscope.files

2. Build Cscope database
> cscope -b -q -k

3. Use Vim to open source file. It's possible to use Cscope inside Vim.
: cs (help)
: cs find c aim_config_set_int (find all functions that call aim_config_set_int)

No comments: