Add convenient keyboard shortcuts

This commit is contained in:
Wojciech Kozlowski 2017-08-18 22:31:11 +01:00
parent 4dcf901a1b
commit 6d018a2b25

15
init.el
View File

@ -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.
;;