地址:http://blog.csdn.net/bigmarco/article/details/6731864
http://cx4a.org/software/auto-complete/auto-comlete
號稱Auto Complete Mode is the most intelligent auto-completion extension for GNU Emacs.
1st 下載 auto-complete
$wget http://cx4a.org/pub/auto-complete/auto-complete-1.3.1.tar.bz2
$tar jxvf auto-complete-1.3.1.tar.bz2
下載后解壓到任意目錄。
2ed 安裝auto-complete
$cd auto-complete-1.3.1
$make
$make install
這里會讓你選擇安裝目錄,這里輸入你自己存放emacs插件的路徑即可
安裝完成后會有如下提示
Successfully installed!
Add the following code to your .emacs:
(add-to-list 'load-path "/home/backfire/emacs/auto-complete")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "/home/backfire/emacs/auto-complete/ac-dict")
(ac-config-default)
將深藍色部分添加到/home/$(name)/.emacs文件中后auto-complete即可正常使用了
可以補全的地方會彈出窗口,M+n 和M+p上下選擇,TAB,回車或者M+j選擇
至於怎么手動啟動補全我還不清初,知道后再補上,不過感覺這個補全還是滿好用。
有大牛說auto-complete最好的地方是可以方便的使用其他語法補全插件的結果,配合使用會非常強大。過陣子研究下
