emacs cscope

来源:互联网 发布:oracle tns 修改端口 编辑:程序博客网 时间:2024/06/06 09:28

  cscope -Rbkq


这个命令会生成三个文件:cscope.out, cscope.in.out, cscope.po.out。
其中cscope.out是基本的符号索引,后两个文件是使用”-q”选项生成的,可以加快cscope的索引速度。
上面所用到的命令参数,含义如下:

-R: 在生成索引文件时,搜索子目录树中的代码
-b: 只生成索引文件,不进入cscope的界面
-k: 在生成索引文件时,不搜索
/usr/include目录
-q: 生成cscope
.in.out和cscope.po.out文件,加快cscope的索引速度

默认的按键绑定

;; * Keybindings:

;;

;; All keybindings use the "C-c s" prefix, but are usable only while

;; editing a source file, or in the cscope results buffer:

;;

;;      C-c s s         Find symbol.

;;      C-c s d         Find global definition.

;;      C-c s g         Find global definition (alternate binding).

;;      C-c s G         Find global definition without prompting.

;;      C-c s c         Find functions calling a function.

;;      C-c s C         Find called functions (list functions called

;;                      from a function).

;;      C-c s t         Find text string.

;;      C-c s e         Find egrep pattern.

;;      C-c s f         Find a file.

;;      C-c s i         Find files #including a file.

;;

;; These pertain to navigation through the search results:

;;

;;      C-c s b         Display *cscope* buffer.

;;      C-c s B         Auto display *cscope* buffer toggle.

;;      C-c s n         Next symbol.

;;      C-c s N         Next file.

;;      C-c s p         Previous symbol.

;;      C-c s P         Previous file.

;;      C-c s u         Pop mark.

;;

;; These pertain to setting and unsetting the variable,

;; `cscope-initial-directory', (location searched for the cscope database

;;  directory):

;;

;;      C-c s a         Set initial directory.

;;      C-c s A         Unset initial directory.

;;

;; These pertain to cscope database maintenance:

;;

;;      C-c s L         Create list of files to index.

;;      C-c s I         Create list and index.

;;      C-c s E         Edit list of files to index.

;;      C-c s W         Locate this buffer's cscope directory

;;                      ("W" --> "where").

;;      C-c s S         Locate this buffer's cscope directory.

;;                      (alternate binding: "S" --> "show").

;;      C-c s T         Locate this buffer's cscope directory.

;;                      (alternate binding: "T" --> "tell").

;;      C-c s D         Dired this buffer's directory.