From ed8c4fa9df0ec964911597c48da1763c74209a0c Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 1 Jul 2019 00:38:05 -0400 Subject: [PATCH] emacs: experiment with some window-management-related key bindings --- .emacs.d/init.el | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 0443445..a90ab7c 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -482,7 +482,6 @@ For disabling the behaviour for certain buffers and/or modes." ("s-p" . beginning-of-buffer) ("s-n" . end-of-buffer) - ("M-o" . other-window) ("M-O" . facemenu-keymap) :map emacs-lisp-mode-map @@ -843,7 +842,7 @@ For disabling the behaviour for certain buffers and/or modes." ("M-p" . outline-previous-visible-heading) ("M-n" . outline-next-visible-heading) :prefix-map a/outline-prefix-map - :prefix "s-o" + :prefix "s-O" ("TAB" . outline-toggle-children) ("a" . outline-hide-body) ("H" . outline-hide-body) @@ -1301,7 +1300,7 @@ For disabling the behaviour for certain buffers and/or modes." "C-c P 4" "projectile/other-window" "C-c q" "boxquote" "s-g" "magit" - "s-o" "outline" + "s-O" "outline" "s-t" "themes") ;; prefixes for major modes @@ -1611,6 +1610,27 @@ For disabling the behaviour for certain buffers and/or modes." (use-package emojify :hook (erc-mode . emojify-mode)) +(use-feature window + :bind + (("s-o" . other-window) + ("M-o" . other-window) + ("s-/ ." . split-window-right) + ("s-/ ," . split-window-below) + ("s-/ 0" . delete-window) + ("s-q" . delete-window))) + +(use-feature windmove + :defer 0.6 + :bind + (("s-h" . windmove-left) + ("s-j" . windmove-down) + ("s-k" . windmove-up) + ("s-l" . windmove-right) + ("s-H" . windmove-swap-states-left) + ("s-J" . windmove-swap-states-down) + ("s-K" . windmove-swap-states-up) + ("s-L" . windmove-swap-states-right))) + ;;; Email (with Gnus) -- 2.20.1