Emacs中的C++程序智能提示是个不容易的活。我使用的是auto-completion插件。该插件依赖clang编译器进行代码分析,当然还依赖其他的emacs插件。下面是我的Emacs配置文件。
;;------------------------------------------------------------------------------
;; auto complete
;;------------------------------------------------------------------------------
;;(load-file (expand-file-name "/opt/emacs_plugins/c++/auto-complete-1.3.1")
;;(add-to-list 'load-path "/opt")
;;(require 'auto-complete-config)
;;(add-to-list 'ac-dictionary-directories "/opt/ac-dict")
;;(ac-config-default)
(add-to-list 'load-path "/opt/emacs_plugins/c++/auto-complete-1.3.1")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "/opt/ac-dict")
;;------------------------------------------------------------------------------
;; yasnippet
;;------------------------------------------------------------------------------
;;sudo apt-get