summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--emacs/init.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 9f992c7..827a640 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -878,6 +878,19 @@ The misspelled word is taken from OVERLAY.  WORD is the corrected word."
 (global-set-key [remap query-replace-regexp] 'anzu-query-replace-regexp)
 
 
+;; Switch to new window on creation
+(defun noa/split-and-follow-horizontally ()
+  (interactive)
+  (split-window-below)
+  (other-window 1))
+(global-set-key (kbd "C-x 2") 'noa/split-and-follow-horizontally)
+
+(defun noa/split-and-follow-vertically ()
+  (interactive)
+  (split-window-right)
+  (other-window 1))
+(global-set-key (kbd "C-x 3") 'noa/split-and-follow-vertically)
+
 (setopt shell-file-name "/bin/sh")
 
 (defun snarf-song (url)