首页 > 代码库 > 树莓派个人配置(更新中)
树莓派个人配置(更新中)
EMACS相关
sudo apt-get install cscopeapt-get install cscope-elcp /usr/share/emacs/site-lisp/xcscope.el ~/emacs.d/site-lisp/
安装完毕后编辑~/.emacs
;;LOAD_PATH (add-to-list ‘load-path‘ "~/.emacs.d/site-lisp")(add-to-list ‘load-path‘ "/usr/share/emacs/site-lisp/")(require ‘xcscope)(define-key global-map [(control f3)] ‘cscope-set-initial-directory)(define-key global-map [(control f4)] ‘cscope-unset-initial-directory)(define-key global-map [(control f5)] ‘cscope-find-this-symbol)(define-key global-map [(control f6)] ‘cscope-find-global-definition)(define-key global-map [(control f7)] ‘cscope-find-global-definition-no-prompting)(define-key global-map [(control f8)] ‘cscope-pop-mark)(define-key global-map [(control f9)] ‘cscope-next-symbol)(define-key global-map [(control f10)] ‘cscope-next-file)(define-key global-map [(control f11)] ‘cscope-prev-symbol)(define-key global-map [(control f12)] ‘cscope-prev-file)(define-key global-map [(meta f9)] ‘cscope-display-buffer)(define-key global-map [(meta f10)] ‘cscope-display-buffer-toggle)
阅读代码前需要建立索引:
cscope-indexer -r
绑定按键说明:
;; * 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.
显示行号,需要编辑~/.emacs:
‘(global-linum-mode t)
树莓派个人配置(更新中)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。