5

I'm using spacemacs: https://github.com/syl20bnr/spacemacs

I've tried both user hook places for overriding cmd-k to be kill-buffer rather than delete-window. However, when I restart, neither works.

(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)
)

What's the best way to debug this?

justingordon
  • 12,553
  • 12
  • 72
  • 116

1 Answers1

0

I just noticed that you have defined defun dotspacemacs/user-init inside defun dotspacemacs/user-init.

Rather than that, I test (global-set-key (kbd "s-k") 'kill-buffer) in dotspacemacs/user-init and dotspacemacs/user-config and works it both places.

Maybe the error it's something related to your config file.

Did you have enabled osx layer?

Diego Alvarez
  • 2,837
  • 1
  • 17
  • 16
  • 1
    I probably have enabled the osx layer. Here's my setup: https://github.com/justin808/justin808-dotfiles/tree/master/jg-spacemacs – justingordon Oct 21 '15 at 07:53