安装:
然后配置 emacs:
(setq load-path (cons "~/lisp" load-path));;意思是将 ~/lisp 加入 load-path
(autoload 'gtags-mode "gtags" "" t)
自动装载 gtags-mode 模式
运行 emacs 后直接 m-x gtags-mode就可以用 GLOBAL 了
如果想以开启 C-mode 就装载 gtags-mode 可以加入以下代码:
(setq c-mode-hook
'(lambda ()
(gtags-mode 1)))
用法:
[xxx]$ etags
则 global 会递归代码中所有目录,生成 GPATH, GRTAGS, GSYMS, GTAGS
- gtags-find-tag (已经与 m-. 进行了绑定), 用来搜索函数或宏定义,不能搜索变量
- gtags-find-rtag 用来查找 tag 以及 tag reference(引用),同时给出一个列表,像 source insight 一样
- gtags-select-mode 用来指定上面 rtag 的行数
- gtags-find-tag-from-here 最全面了,好像只要是 symbol 它都给你标出来,像 rtag 一样列出来,这个也不用手动去输入字符,光标指向那个字符串就查找哪个字符串
- gtags-find-with-grep 用正则表达式查找字符串
- 其实 gtags-find-tag 也支持 POSIX 正则表达式。。。
98



被折叠的 条评论
为什么被折叠?



