summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-20 18:34:18 -0400
committerDavid Robillard <d@drobilla.net>2022-07-20 18:34:18 -0400
commit31e1836781b8e1d167035e7fd3562d76b63b69ae (patch)
treeb5fd3176366ea42e18bbf8068a1775870f23d143 /emacs
parent6f7fbb9dbef6b3cfd8bcf71631f7a701c3caf411 (diff)
downloaddotfiles-31e1836781b8e1d167035e7fd3562d76b63b69ae.tar.gz
dotfiles-31e1836781b8e1d167035e7fd3562d76b63b69ae.tar.bz2
dotfiles-31e1836781b8e1d167035e7fd3562d76b63b69ae.zip
Improve window keybindings
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.el61
1 files changed, 32 insertions, 29 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index c1d5150..20b7522 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -370,37 +370,40 @@
;;; Key bindings
+(windmove-default-keybindings)
+
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
-(global-set-key (kbd "C-<left>") 'previous-buffer)
-(global-set-key (kbd "C-<right>") 'next-buffer)
-(global-set-key (kbd "C-<tab>") 'other-window)
-(global-set-key (kbd "C-b") 'compile)
-(global-set-key (kbd "C-m") 'newline-and-indent)
-(global-set-key (kbd "C-n") 'next-error)
-(global-set-key (kbd "C-p") 'previous-error)
-(global-set-key (kbd "C-s") 'swiper)
-
-(global-set-key (kbd "C-c <") 'first-error)
-(global-set-key (kbd "C-c =") 'set-variable)
-(global-set-key (kbd "C-c I") 'clang-format-region)
-(global-set-key (kbd "C-c R") 'replace-regexp)
-(global-set-key (kbd "C-c a") 'align)
-(global-set-key (kbd "C-c b") 'magit-blame)
-(global-set-key (kbd "C-c c") 'comment-region)
-(global-set-key (kbd "C-c d") 'svn-status-show-svn-diff)
-(global-set-key (kbd "C-c e") 'erc-track-switch-buffer)
-(global-set-key (kbd "C-c f") 'ff-find-other-file)
-(global-set-key (kbd "C-c g") 'grep-find)
-(global-set-key (kbd "C-c h") 'mark-defun)
-(global-set-key (kbd "C-c i") 'clang-format-buffer)
-(global-set-key (kbd "C-c m") 'magit-status)
-(global-set-key (kbd "C-c o") 'ace-window)
-(global-set-key (kbd "C-c r") 'replace-string)
-(global-set-key (kbd "C-c s") 'sort-lines)
-(global-set-key (kbd "C-c t") 'toggle-truncate-lines)
-(global-set-key (kbd "C-c u") 'uncomment-region)
-(global-set-key (kbd "C-c w") 'rotate-windows)
+(global-set-key (kbd "C-<left>") 'previous-buffer)
+(global-set-key (kbd "C-<right>") 'next-buffer)
+(global-set-key (kbd "C-<tab>") 'next-window-any-frame)
+(global-set-key (kbd "C-<iso-lefttab>") 'previous-window-any-frame)
+(global-set-key (kbd "C-b") 'compile)
+(global-set-key (kbd "C-m") 'newline-and-indent)
+(global-set-key (kbd "C-n") 'next-error)
+(global-set-key (kbd "C-p") 'previous-error)
+(global-set-key (kbd "C-s") 'swiper)
+(global-set-key (kbd "C-c <") 'first-error)
+(global-set-key (kbd "C-c =") 'set-variable)
+(global-set-key (kbd "C-c I") 'clang-format-region)
+(global-set-key (kbd "C-c P") 'prettier-prettify)
+(global-set-key (kbd "C-c R") 'replace-regexp)
+(global-set-key (kbd "C-c a") 'align)
+(global-set-key (kbd "C-c b") 'magit-blame)
+(global-set-key (kbd "C-c c") 'comment-region)
+(global-set-key (kbd "C-c d") 'svn-status-show-svn-diff)
+(global-set-key (kbd "C-c e") 'erc-track-switch-buffer)
+(global-set-key (kbd "C-c f") 'ff-find-other-file)
+(global-set-key (kbd "C-c g") 'grep-find)
+(global-set-key (kbd "C-c h") 'mark-defun)
+(global-set-key (kbd "C-c i") 'clang-format-buffer)
+(global-set-key (kbd "C-c m") 'magit-status)
+(global-set-key (kbd "C-c o") 'ace-window)
+(global-set-key (kbd "C-c r") 'replace-string)
+(global-set-key (kbd "C-c s") 'sort-lines)
+(global-set-key (kbd "C-c t") 'toggle-truncate-lines)
+(global-set-key (kbd "C-c u") 'uncomment-region)
+(global-set-key (kbd "C-c w") 'rotate-windows)
;;; File modes