How do I bind CMD+W to kill the current buffer in Emacs on OSX? C-x k RET is unnatural and a comparatively lengthy binding compared to CMD+W.

link|improve this question

59% accept rate
feedback

1 Answer

up vote 0 down vote accepted
(defun kill-current-buffer ()
  (interactive)
  (kill-buffer (current-buffer)))
(global-set-key (kbd "s-w") 'kill-current-buffer)

(Credit goes to jlf at #emacs)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.