ubuntu下安装cscope的注意事项

来源:互联网 发布:西南大学西塔学院 知乎 编辑:程序博客网 时间:2024/04/29 20:20

1)除了安装cscope还需要安装cscope-el,不然找不到xcscope.el

sudo apt-get install cscope-el cscope

2)xcscope.el的默认路径:/usr/share/emacs/site-lisp


3)使用

默认是的快捷键都是绑定到 C-c s 的前缀上面,如果嫌麻烦的话可以自己更改 快捷键绑定。这是默认的用于查找的键绑定:
==============================================================================================================
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.

----------------------------------------------------------------------------------------------------------------------------------------------------------
下面是在搜索到的结果之间切换用的快捷键:


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.
更详细的使用说明请参见 xcscope.el 文件头部的注释。

================================================================================================================