How to install cscope:
sudo apt-get install cscope
mkdir -p ~/.vim/plugin
cd ~/.vim/plugin
wget http://cscope.sourceforge.net/cscope_maps.vim
How to create the index:
cscope -bR
How to find file:
:cs f f <filename>
Useful command:
CTRL+]
Go to function definition.
CTRL+ O
Back to the previous place.
]]
Go to the start of this function
[[
Go to the end of this function
Ctrl + \ and press 's'
Find all references.
Reference:
用 vim 和 cscope 來 trace 程式碼
http://softsmith.blogspot.tw/2009/01/vim-cscope-trace.html
No comments:
Post a Comment
You can leave any question here and I will make a response to you ASAP. :D