2

我想通过为后者处于活动状态的缓冲区禁用前者来避免邪恶模式paredit之间的冲突。

以下代码不起作用:

(add-hook 'emacs-lisp-mode-hook 'turn-off-evil-mode)
(add-hook 'lisp-mode-hook 'turn-off-evil-mode)
(add-hook 'lisp-interaction-mode-hook 'turn-off-evil-mode)
(add-hook 'inferior-lisp-mode-hook 'turn-off-evil-mode)
(add-hook 'clojure-mode-hook 'turn-off-evil-mode)
(add-hook 'scheme-mode-hook 'turn-off-evil-mode)
(add-hook 'ielm-mode-hook 'turn-off-evil-mode)
(add-hook 'eval-expression-minibuffer-setup-hook 'turn-off-evil-mode)

换句话说,如何自动禁用所有 Lisp 缓冲区的邪恶模式?

4

1 回答 1

3

你可以建议paredit-mode

(defadvice paredit-mode (around paredit-disable-evil activate)
  (if paredit-mode
      ad-do-it
    (turn-off-evil-mode)
    ad-do-it))

另外,你试过lispy吗?这是我受 vi 启发的类似 Paredit 的包。它具有比 Paredit 更多的功能,例如内联评估、区域操作和轮廓。

于 2015-01-19T13:57:18.027 回答