我的Emacs配置

2021-05-22 18:03:20 字數 1191 閱讀 2555

;;乙個snippet外掛程式可以自定義模板, http://code.google.com/p/yasnippet/

(add-to-list 'load-path

"d:/lvan/emacs_plugin/yasnippet-0.6.1c")

(require 'yasnippet)

(yas/initialize)

(yas/load-directory "d:/lvan/emacs_plugin/yasnippet-0.6.1c/snippets")

;;自動完成外掛程式, http://www.emacswiki.org/emacs/autocomplete

(require 'auto-complete)

(require 'auto-complete-config)

(global-auto-complete-mode t)

(setq-default ac-sources '(ac-source-words-in-same-mode-buffers))

(add-hook 'emacs-lisp-mode-hook (lambda () (add-to-list 'ac-sources 'ac-source-symbols)))

(add-hook 'auto-complete-mode-hook (lambda () (add-to-list 'ac-sources 'ac-source-filename)))

(set-face-background 'ac-candidate-face "lightgray")

(set-face-underline 'ac-candidate-face "darkgray")

(set-face-background 'ac-selection-face "steelblue") ;;;設定比上面截圖中更好看的背景顏色

(define-key ac-completing-map "/m-n" 'ac-next)  ;;; 列表中通過按m-n來向下移動

(define-key ac-completing-map "/m-p" 'ac-previous)

(setq ac-auto-start 2)

(setq ac-dwim t)

(define-key ac-mode-map (kbd "m-tab") 'auto-complete)

我的emacs配置

linux系統中emacs還是有它的好處的,之前我也覺得emacs是個怪胎,但發現只要對emacs進行一定的配置,還是可以用的。最最重要的就是要徹底顛覆emacs原來的熱鍵設定,直接有乙個ergoemacs包可以實現這個,上面的圖就是安裝好ergoemacs以後的熱鍵圖。除了圖裡面的ctrl s,c...

我的emacs配置部分

global set key kbd ret newline and indent 換行 global set key kbd c a mark whole buffer ctrl a全選 set background color grey15 背景顏色 set foreground color g...

我的第乙份 emacs 配置

emacs.d init.el 一開啟就起用 org 模式。setq default major mode org mode add to list auto mode alist org org mode 語法高亮 global font lock mode t 以 y n代表 yes no fs...