emacsConfig下創建install目錄,結構大概這樣php
. ├── auto-complete-etags-setting.el ├── auto-complete-setting.el ├── auto-complete-yasnippet-setting.el ├── autopair-setting.el ├── buffer-setting.el ├── clang-complete-async-setting.el ├── code-style-setting.el ├── dir-setting.el ├── etags │ ├── kernel │ ├── muduo │ └── qt ├── etags-select-setting.el ├── evil-setting.el ├── gdb-setting.el ├── gtags │ └── muduo │ ├── GPATH │ ├── GRTAGS │ ├── GSYMS │ └── GTAGS ├── gtags-setting.el ├── imenu-tree-setting.el ├── install │ ├── imenu-tree-install │ │ ├── install.sh │ │ ├── patch │ │ │ └── imenu-tree.el │ │ └── readme │ ├── _init.el_ │ ├── install.sh │ ├── readme │ ├── recipes │ │ └── clang-complete-async.rcp │ └── remove.sh ├── kbd-mouse-setting.el ├── monokai-theme.el ├── original-tags.el ├── php-setting.el ├── snippets │ ├── custom │ └── yas-git ├── speedbar-setting.el ├── switch-file-setting.el ├── tabbar-setting.el ├── ui-setting.el └── window-setting.el
_init.el_git
1 (add-to-list 'load-path "~/.emacs.d/el-get/el-get") 2 3 (unless (require 'el-get nil 'noerror) 4 (with-current-buffer 5 (url-retrieve-synchronously 6 "https://raw.github.com/dimitri/el-get/master/el-get-install.el") 7 (goto-char (point-max)) 8 (eval-print-last-sexp))) 9 10 (add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes") 11 (el-get 'sync) 12 13 ;不知道爲何,按照文檔的設置無效,那麼,就用我本身的吧 14 ;(setq el-get-user-package-directory "~/.emacs.d/el-get-init-files/") 15 16 ;------------------------------------------------------------------------------ 17 ;設置擴展文件所在目錄 18 (add-to-list 'load-path "~/emacsConfig") 19 20 ;逐個裝載上面目錄下全部的配置文件 21 (mapc 'load (directory-files "~/emacsConfig" t "^[a-zA-Z0-9].*.el$"))
install.shgithub
1 mkdir -p ~/.emacs.d/el-get-user/recipes 2 cp ./recipes/* ~/.emacs.d/el-get-user/recipes 3 cp ./_init.el_ ~/.emacs.d/init.el 4 5 echo "Install success!";
remove.shweb
1 rm -rf ~/.emacs.d 2 3 echo "remove success!";
~/emacsConfig/install/recipes/clang-complete-async.rcpless
1 (:name clang-complete-async 2 :website "https://github.com/Golevka/emacs-clang-complete-async" 3 :description "An emacs extension to complete C and C++ code using libclang." 4 :type github 5 :pkgname "Golevka/emacs-clang-complete-async" 6 :build '(("make")) 7 :depends auto-complete 8 :features auto-complete-clang-async 9 :prepare (setq ac-clang-complete-executable 10 (expand-file-name 11 (concat (el-get-package-directory "clang-complete-async") "clang-complete"))))
imenu-tree注意async
~/emacsConfig/install/imenu-tree-install/patch/imenu-tree.el爲修改過的imenu-tree.el函數
~/emacsConfig/install/imenu-tree-install/install.shui
cp patch/imenu-tree.el ~/.emacs.d/el-get/imenu-tree/imenu-tree.el echo "imenu-tree installed with position on right!";
readmeurl
第一次安裝,須要alt+x執行安裝命令 el-get-install如下幾個 evil php-mode-improved tabbar auto-complete auto-complete-etags(我這邊沒有補全效果) etags-select(這個比較準確,比自帶的好) auto-complete-emacs-lisp autopair cc-mode+ sr-speedbar yasnippet auto-complete-yasnippet imenu-tree(用來顯示文件內symbol的插件,下面幾個都是imenu-tree須要的插件) imenu+ tree-mode windata gtags(安裝以前須要下面的命令) debian: sudo apt-get install global mac: brew install global 同時,須要ln -s作幾個軟鏈接 /usr/local/bin/global鏈接到/usr/bin /usr/local/bin/gtags鏈接到/usr/bin clang-complete-async(安裝以前須要下面的命令) debian: sudo apt-get install llvm-dev sudo apt-get install libclang-dev mac: brew install --with-clang --all-targets --rtti --universal --jit llvm,多點耐心,須要好久 ----------------------------------------------------------------------------- ecb: 因爲method buffer的東西沒法更新,所以放棄此庫 ----------------------------------------------------------------------------- imenu-tree ----------------------------------------------------------------------------- 安裝查看install目錄的imenu-tree-install子目錄 ----------------------------------------------------------------------------- 安裝配置 auto-complete-etags etags: 生成tag: 自定義函數:generate-etags 加載tag: 自定義命令:load-etags 插件命令:visit-tags-table 查找定義: 快捷鍵:alt+o,d 命令:etags-select-find-tag-at-point list-tags: 顯示某個h文件內全部的tag gtags 生成tag: 自定義函數:generate-gtags 加載tag: 自定義命令:load-gtags 插件命令:gtag-visit-rootdir 查找變量引用: 快捷鍵:c-x,v 命令:gtags-find-symbol 查找函數引用: 快捷鍵:c-x,f 命令:gtags-find-rtag tag跳轉:alt+enter 前進後退的快捷鍵爲alt加方向鍵 F11切換h和cpp文件 ctrl+enter,打開include的頭文件 F2打開speed-bar F12打開imenu-tree 在啓動就須要加載的tag須要在original-tags.el裏面手工修改