Many articles on VIM + cscope on the Internet
However, neither windows + gvim + csloud can list the call/called functions (CTRL + \ + C, CTRL + \ + D)
Finally, find this article. In Windows, run cmd to run the following commands:
D: \ soft \ vxwork_src> dir
/S/B *. C *. cpp *. h> cs.pdf. Files
D: \ soft \ vxwork_src> cs.pdf
-B
Reference the original article in the following content:
Download
-----------------------------------
Download cscope15.6-win32.zip
Install
-----------------------------------
The installation is simple. You only need to put the executable file of cssag into the directory contained in the path environment variable.
(1) Windows users are recommended to put cscope.exeand gvim.exe downloaded from the same directory, for example, D: \ Program Files \ Vim \ vim72.
(2) "My Computer" --> "property" --> "advanced" --> "environment variable" --> "system variable"
Path: D: \ Program Files \ Vim \ vim72 (directory of the Environment Variable path1_cscope.exe)
After logout/restart, the path takes effect.
(3) "start" --> "run" --> "cmd"
C: \ Documents ents and Settings \ Administrator> cs.pdf
-V
Cslk: Version 15.6. Compiled by mslk (mslk.sa@gmail.com)
If you can see that the cssag version is good, it indicates that the installation is successful.
(4) to make it easy to use csvim, we also need to download cscope keyboard ing settings for cscope, so that cscope can be used simply by using shortcuts in gvim, instead of making complicated commands. You can download the keyboard ing at http://cscope.sourceforge.net/cscope_maps.vim.
Place the downloaded cscope_maps.vim file in the gvim plug-in directory, for example, D: \ Program Files \ Vim \ vimfiles \ plugin. Linux users can put it in $ home/. Vim/plugin.
Create a symbolic database
-----------------------------------
(1) Let's assume that the code we want to read is under D: \ SRC \ myproject. Open the command line and enter the directory where the source code is located to create a search file list for cssag. Run the following command in the command line:
D: \ soft \ vxwork_src> DIR/s
/B *. C *. h> cscope. Files
D: \ soft \ vxwork_src> cs.pdf
-B
After the execution, you can find the cssag. Out file in the current directory. This is the symbolic database created by cssag. In the preceding command, the-B parameter makes cssag create a symbolic database instead of starting its own user interface.
(2) edit d: \ Program Files \ Vim \ _ vimrc and add the following content.
CS a D: \ soft \ vxwork_src \ cs.pdf. Out
If your source code is C ++, you can add the CPP extension to the above command.
DIR/S/B *. C *. H * CPP *. HPP> cs.pdf. Files
If you are a Linux user, you can use the find command to implement the same functions:
Find $ (PWD)-name "*. [CH]"