I'm a newbie in Emacs configuration, I've just discovered the possibility to define my own key bindings to fit my needs. It is really cool, but Emacs has so many key bindings that some default key bindings often overlap mine.
For example, I would like to have proper keys window splitting and navigation, and I like do this with arrows.
This is what I may like :
;; Wind-split
(global-set-key (kbd "C-x <C-down>") 'split-window-below)
(global-set-key (kbd "C-x <C-left>") 'split-window-right)
(global-set-key (kbd "C-x <C-up>") 'find-file-other-window)
(global-set-key (kbd "C-x <C-right>") 'switch-to-buffer-other-window)
;; Wind-move
(global-set-key (kbd "C-c <left>") 'windmove-left)
(global-set-key (kbd "C-c <down>") 'windmove-down)
(global-set-key (kbd "C-c <up>") 'windmove-up)
(global-set-key (kbd "C-c <right>") 'windmove-right)
;; Wind-resize
(global-set-key (kbd "C-c <C-up>") 'enlarge-window)
(global-set-key (kbd "C-c <C-down>") 'shrink-window)
(global-set-key (kbd "C-c <C-right>") 'enlarge-window-horizontally)
(global-set-key (kbd "C-c <C-left>") 'shrink-window-horizontally)
(global-set-key (kbd "C-c =") 'balance-windows)
;; Wind-arranging
(global-set-key (kbd "C-c C-d") 'delete-window)
(global-set-key (kbd "C-c C-c C-d") 'kill-buffer-and-window)
You'll probably notice that I have used C-c
a lot and it's normal that it's overlapped since C-c
is traditionally used in modes, but C-x
seems less accessible and I other characters are often used for other commands.
So what easy key bindings to use for these basic operations ?