我正在使用spacemacs:https://github.com/syl20bnr/spacemacs
我已经尝试将两个用户挂钩位置覆盖cmd-k而不是kill-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)
)
调试此问题的最佳方法是什么?
答案 0 :(得分:0)
我刚注意到您在defun dotspacemacs/user-init
内定义了defun dotspacemacs/user-init
。
而不是那样,我在(global-set-key (kbd "s-k") 'kill-buffer)
和dotspacemacs/user-init
中测试dotspacemacs/user-config
并在两个地方都进行测试。
可能是错误,它与您的配置文件有关。
您是否启用了osx层?