【发布时间】:2012-01-18 09:02:56
【问题描述】:
我用邪恶,得到了
(defcustom evil-shift-width 4
"The offset used by \\<evil-normal-state-map>\\[evil-shift-right] \
and \\[evil-shift-left]."
:type 'integer
:group 'evil)
我想将 evil-shift-width 设置为缓冲区局部缩进宽度(变量 indent)。
(add-hook 'after-change-major-mode-hook
(function (lambda ()
(setq evil-shift-width indent))))
我错过了什么?
【问题讨论】:
-
您在
(setq ...)表单周围缺少一对括号,以及您想要或期望indent是什么的说明。 -
@tripleee 希望对您有所帮助。
-
会发生什么,您预计会发生什么?
indent来自哪里,何时设置? -
indent应该来自当前的主要模式,代表缩进宽度,python 为 4,ruby 为 2,依此类推。目前,对于 ruby,我将它设置为 2,但这对 python 来说很烦人。 -
您尝试过使用最小的 .emacs 吗?是python模式的问题吗?