" Usage " ----- " First of all, you must execute gtags(1) at the root of source directory " to make tag files. Assuming that your source directory is '/var/src', " it is neccessary to execute the following commands. " " [Load vim] " $ cd /var/src " $ gtags " $ vim " [Load gtags-cscope] " :GtagsCscope <ENTER> (in vim command line) " " Basic command " ------------- " Then you can use cs commands except for the 'd'(2) command. " Profitable commands are assigned to keys like follows: " " explanation command " ---------------------------------------------------------- " Find symbol :cs find 0 or s " Find definition :cs find 1 or g " Find functions called by this function (not implemented) " Find reference :cs find 3 or c " Find text string :cs find 4 or t " Find egrep pattern :cs find 6 or e " Find path :cs find 7 or f " Find include file :cs find 8 or i " Find assignments :cs find 9 or a " " You can move tag list using: " Go to the next tag :tn " Go to the previous tag :tp " Pop tag stack :pop
除了不能使用 :cs find d 命令,可以使用其他所有的命令,gtags-cscope.vim 使用快捷键替代了输入命令,常用的快捷键的含义如下:
$ ctags Command 'ctags' not found, but can be installed with: sudo snap install universal-ctags # version 0.2024-05-27+09:10:28+653ca9204, or sudo apt install exuberant-ctags # version 1:5.9~svn20110310-19 sudo apt install universal-ctags # version 5.9.20210829.0-1 See 'snap info universal-ctags' for additional versions.