Tôi muốn làm cho yasnippet
làm phụ trợ của auto-complete
. Tuy nhiên, nó không hoạt động. những gì tôi làm sau khi đã tìm kiếm internet là như sau: được auto-complete-yasnippet.el, thêm một số elisp trong .emacs
như thế này:Làm cách nào để đặt yasnippet thành phần phụ trợ tự động hoàn thành?
(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
)
)
tôi nhìn vào nội dung trong ac-sources
trong * cào * với Ch v, và nó có ac-source-yasnippet
. ai đó said rằng có thể có sự cố với phiên bản và nâng cấp auto-complete
cũng như yasnippet
. Làm thế nào nó có thể được cố định? Phiên bản emacs
của tôi là 23.3.1 phiên bản auto-complete
của tôi là 1.3.1 và phiên bản yasnippet
của tôi là 0.8.0 (beta) vừa được tải xuống từ github. bất kỳ giúp đỡ?
Tôi đang sử dụng emacs dưới Windows 7, và 'M/'là keybinding mà tôi định nghĩa để làm cho' yasnippet' không xung đột với 'tự động hoàn thành' khi sử dụng phím TAB – toolchainX