5

我正在使用 spacemacs:https ://github.com/syl20bnr/spacemacs

我已经尝试了两个用户挂钩位置来覆盖 cmd-kkill-buffer而不是delete-window. 但是,当我重新启动时,两者都不起作用。

(defun dotspacemacs/user-init ()
  "Initialization function for user code.
It is called immediately after `dotspacemacs/init'.  You are free to put any
user code."
  (defun dotspacemacs/user-init ()
    (global-set-key (kbd "s-k") 'kill-buffer)
    )
  )

(defun dotspacemacs/user-config ()
  "Configuration function for user code.
 This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
    (global-set-key (kbd "s-k") 'kill-buffer)
)

调试这个的最佳方法是什么?

4

1 回答 1

0

我刚刚注意到你在defun dotspacemacs/user-init里面定义了defun dotspacemacs/user-init.

而不是那样,我在两个地方都进行了测试(global-set-key (kbd "s-k") 'kill-buffer)和工作dotspacemacs/user-initdotspacemacs/user-config

也许错误与您的配置文件有关。

您是否启用了 osx 层?

于 2015-10-21T04:24:10.813 回答