Skip to content

Instantly share code, notes, and snippets.

@syohex
Created June 30, 2012 14:24
Show Gist options
  • Save syohex/3023917 to your computer and use it in GitHub Desktop.
Save syohex/3023917 to your computer and use it in GitHub Desktop.
kill current buffer then dired current directory
(defun kill-buffer-and-dired ()
(interactive)
(let (dir (file-name-directory (buffer-file-name (current-buffer))))
(kill-buffer (current-buffer))
(dired dir)))
(global-set-key (kbd "C-x C-k") 'kill-buffer-and-dired)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment