我想yasnippet
将auto-complete
. 但是,它不起作用。我在网上搜索后的操作如下:获取auto-complete-yasnippet.el,添加一些 elisp.emacs
如下:
(add-to-list 'load-path
"~/.emacs.d/plugins/yasnippet")
(require 'yasnippet)
(yas-global-mode 1)
(yas-minor-mode nil)
(global-set-key (kbd "M-/") 'yas/expand)
;; Auto-complete settings
;; this is the code for the auto-complete
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
(ac-config-default)
;;setup for auto-complete-yasnippet
(require 'auto-complete-yasnippet)
(setq-default ac-sources
'(
;; ac-source-semantic
ac-source-yasnippet
ac-source-abbrev
ac-source-words-in-buffer
ac-source-words-in-all-buffer
;; ac-source-imenu
ac-source-files-in-current-dir
ac-source-filename
)
)
我用 . 查看ac-sources
*scratch* 中的内容C-h v,它确实有ac-source-yasnippet
. 有人说可能是auto-complete
as的版本和升级有问题yasnippet
。如何修复?我的emacs
版本是 23.3.1 我的auto-complete
版本是 1.3.1 我的yasnippet
版本是 0.8.0(beta) 是刚刚从github下载的。有什么帮助吗?