2014年10月28日 星期二

[cscope][vim] How to install cscope into vim

1. First Download the code, and write into .vimrc.
2. Reference [VIM] How to install vundle by script
3. Reference 「CSCOPE」 The script of cscope to create cscope.out into project.
4. vim any c code under project, then type LCS to load the cscope.out.

Usage :
:cs help   --  display operation message

Ctrl + \ + c = c: Find functions calling this function
Ctrl + \ + d: Find functions called by this function
Ctrl + \ + e: Find this egrep pattern
Ctrl + \ + f: Find this file
Ctrl + \ + g: Find this definition
Ctrl + \ + i: Find files #including this file
Ctrl + \ + s: Find this C symbol
Ctrl + \ + t: Find assignments to

Reference :
1. [VIM] How to install vundle by script
2.「CSCOPE」 The script of cscope


cscope commands:
add : Add a new database (Usage: add file|dir [pre-path] [flags])
find : Query for a pattern (Usage: find c|d|e|f|g|i|s|t name)
          c: Find functions calling this function
          d: Find functions called by this function
          e: Find this egrep pattern
          f: Find this file
          g: Find this definition
          i: Find files #including this file
          s: Find this C symbol
          t: Find assignments to

help : Show this message (Usage: help)
kill : Kill a connection (Usage: kill #)
reset: Reinit all connections (Usage: reset)
show : Show connections (Usage: show)

0 意見:

張貼留言