我的emacs 配置:
(custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(inhibit-startup-screen t))(custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. );;add by chance;;一、設定快速鍵;;----------------------------------------------------------------------------;;1、為了能把emacs中的內容複寫到系統的剪貼簿(setq x-select-enable-clipboard t);;2、設定f12鍵為跳轉到原函數(global-set-key [f12] 'semantic-ia-fast-jump);;3、 設定shift+F12鍵為從原函數跳回(global-set-key [S-f12] (lambda () (interactive) (if (ring-empty-p (oref semantic-mru-bookmark-ring ring)) (error "Semantic Bookmark ring is currently empty")) (let* ((ring (oref semantic-mru-bookmark-ring ring)) (alist (semantic-mrub-ring-to-assoc-list ring)) (first (cdr (car alist)))) (if (semantic-equivalent-tag-p (oref first tag) (semantic-current-tag)) (setq first (cdr (car (cdr alist))))) (semantic-mrub-switch-tags first))));;4、設定ctrl+p 為自動補全;; 注意:semantic-ia-complete-symbol-menu只能用在GUI下;; 終端下只能用semantic-ia-complete-symbol(define-key global-map [(control p)] 'semantic-ia-complete-symbol-menu);;二、 在下面開啟某些功能服務;; ---------------------------------------------------------------------------;;1、 開啟cedet 服務(add-to-list 'load-path "/opt/cedet/common")(require 'cedet);;2、開啟semantic-ia服務(require 'semantic-ia);;(semantic-load-enable-minimum-features)(semantic-load-enable-code-helpers);;(semantic-load-enable-guady-code-helpers);;(semantic-load-enable-excessive-code-helpers)(semantic-load-enable-semantic-debugging-helpers);;3、引入EDE 專案管理工具(global-ede-mode t);;4、程式碼摺疊功能(require 'semantic-tag-folding nil 'noerror)(global-semantic-tag-folding-mode 1);;三、不知道幹嘛用的;;---------------------------------------------------------------------------;; Enable SRecode (Template management) minor-mode.(global-srecode-minor-mode 1);; Enable EDE (Project Management) features (global-ede-mode 1)