diff --git a/init.el b/init.el index a74d839..c0f188e 100644 --- a/init.el +++ b/init.el @@ -74,6 +74,21 @@ (setq indent-tabs-mode (not indent-tabs-mode)) (setq-default indent-tabs-mode indent-tabs-mode)) + ;; -------------------------------------------------------------------------- + ;; Convenience keyboard shortcuts. + ;; -------------------------------------------------------------------------- + + (defun kill-default-buffer () + "Kill the currently active buffer with no confirmation." + (interactive) + (let (kill-buffer-query-functions) (kill-buffer))) + + (global-set-key (kbd "C-x k") 'kill-default-buffer) ;; Kill current buffer + (global-set-key (kbd "C-c w") 'whitespace-mode) ;; Toggle whitespace mode + (global-set-key (kbd "C-x k") 'kill-default-buffer) ;; Kill current buffer + (global-set-key (kbd "M-o") 'other-window) ;; Change window + (global-set-key (kbd "M-s M-o") 'occur) ;; Occur + ;; -------------------------------------------------------------------------- ;; Configure garbage collection. ;;