歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux服務器 >> 技巧:使用Emacs+Cscope來閱讀代碼

技巧:使用Emacs+Cscope來閱讀代碼

日期:2017/3/2 16:51:13   编辑:Linux服務器

1. 安裝 cscope,

http://cscope.sourceforge.net/

到這裡下載cscope, 最新版本為 15.6.

如果你使用 debian 或者 ubuntu,直接 sudo apt-get install cscope就可以了

2. 安裝 xcscope.el

把 cscope 附帶的 xcscope.el 文件放到你的 emacs的 load-path 下,在 ~/.emacs 中增加:

(require 'xcscope)

3. 生成 project 文件列表,可以用如下命令完成。例如kernel代碼,找出所以 .h, .c, .S文件

find -type f | grep -E '\.[chS]

Copyright © Linux教程網 All Rights Reserved