我在我的.spacemacs文件的底部有代码来创建一些键绑定和与邪恶模式相关的东西。守则如下:
;; Evil mode
(use-package evil
:ensure t
:config
(evil-mode 1)
(use-package evil-escape
:ensure t
:config
(evil-escape-mode 1)
(setq-default evil-escape-key-sequence "fd")
(setq-default evil-escape-delay 0.2))
(use-package evil-leader
:ensure t
:config
(global-evil-leader-mode)
(evil-leader/set-leader "<SPC>")
(evil-leader/set-key
"e" 'find-file
"bb" 'switch-to-buffer
"bd" 'kill-buffer-and-window
"by" 'copy-whole-buffer
"cy" 'clipboard-kill-ring-save
"cp" 'clipboard-yank
"fs" 'save-buffer
"ms" 'magit-status
"hs" 'split-window-horizontally
"iu" 'insert-char
"lf" 'load-file
"ne" 'flycheck-next-error
"pe" 'flycheck-previous-error
"rm" 'notmuch
"sm" 'message-send-and-exit
"si" 'whitespace-mode
"tn" 'linum-mode
"tt" 'term
"w1" 'delete-other-windows
"wk" 'windmove-left
"wj" 'windmove-right
"qq" 'save-buffers-kill-emacs
"zp" 'zeal-at-point
)
)
(use-package evil-surround
:ensure t
:config
(global-evil-surround-mode))
(use-package evil-indent-textobject
:ensure t))由于某些原因,当我使用.spacemacs文件中的代码打开Spacemacs时,我会看到以下内容:

如果我删除了代码,它就会正确打开,但是我可以将它添加回运行M-x eval-region,一切都按预期进行。我是全新的空间从Vim所以任何帮助都会非常感谢!
发布于 2017-03-29 18:39:58
您不应该必须直接导入evil包。只需将变量dotspacemacs-editing-style设置为'vim即可。而且,任何现有的包都应该在dotspacemacs-configuration-layers变量中指定。任何不附带空间added的包都可以通过dotspacemacs-additional-packages添加,或者您可以创建一个层,如果它们需要额外的配置。有关更多信息,请参见此处的文档http://spacemacs.org/doc/DOCUMENTATION.html#dotfile-configuration
发布于 2020-07-01 16:23:00
确保您的代码处于
(defun dotspacemacs/user-init ()
)或
(defun dotspacemacs/user-config ()
) 函数。还有其他方法可以对代码进行评估。
M或(SPC SPC)和类型
configuration-layer/create-layer 这将提示您输入标题和位置等。有了这个,你可以有更多的选择。
https://stackoverflow.com/questions/43095897
复制相似问题