1.安装字符串高亮插件
(1)highlight-synbol插件下载地址:
https://github.com/nschum/highlight-symbol.el
(2)highlight-symbol配置:
文件:~/.emacs
(load-file "~/.emacs.d/elpa/highlight-symbol/highlight-symbol.el")
(require 'highlight-symbol)
(global-set-key [(control f8)] 'highlight-symbol)
(global-set-key [f8] 'highlight-symbol-next)
(global-set-key [(shift f8)] 'highlight-symbol-prev)
(global-set-key [(meta f8)] 'highlight-symbol-query-replace)
2.安装cscope插件:
(1)命令:
sudo apt-get install cscope
sudo apt-get install xcscope-el
(2)配置:
文件:~/.emacs
;;cscope
(load-file "/usr/share/emacs/site-lisp/xcscope/xcscope.el")
(require 'xcscope)
3.罪恶的tab,C++文件设置tab为4个空格
文件:~/.emacs
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq indent-line-function 'insert-tab)
(setq c-default-style "linux")
(setq c-basic-offset 4)
(c-set-offset 'comment-intro 0)