尝试从以下位置为emacs 23安装yasnippet:
https://github.com/capitaomorte/yasnippet
首先,我尝试了快速安装,但“快速”安装的yasnippet-bundle.el
似乎不在存储库中?
其次,我尝试了完整安装。
尝试进行完整安装时出现以下错误:
[yas] Check your `yas/snippet-dirs': ~/.emacs.d/snippets is not a directory
我已下载最新的捆绑capitaomorte-yasnippet-e53c41d/
并已解压缩到.emacs.d/plugins/
我的`.emacs'的加法是:
(add-to-list 'load-path
"~/.emacs.d/plugins/capitaomorte-yasnippet-e53c41d")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/capitaomorte-yasnippet-e53c41d/snippets")
基本上,安装说明似乎与最新的src不同步。有谁知道如何安装它?
答案 0 :(得分:4)
您需要初始化yas/root-directory
。以下是我如何设置yasnippet
(require 'yasnippet "~/emacs/addons/yasnippet.el")
(yas/initialize)
(setq yas/root-directory "~/emacs/snippets")
(yas/load-directory yas/root-directory)