1
0
Fork 0

fix(emacs): add small window keybind

This commit is contained in:
Lucas Sta Maria 2025-03-27 20:08:41 -04:00
parent b2f1784d02
commit cb29a3a9d8
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47
2 changed files with 15 additions and 1 deletions

View file

@ -46,7 +46,8 @@
"h" #'priime-window-left "h" #'priime-window-left
"t" #'priime-window-down "t" #'priime-window-down
"n" #'priime-window-up "n" #'priime-window-up
"s" #'priime-window-right) "s" #'priime-window-right
"c" #'priime-open-on-right)
(defvar-keymap meow-misc-keymap (defvar-keymap meow-misc-keymap
"f" #'set-fill-column "f" #'set-fill-column

View file

@ -68,6 +68,19 @@
(windmove-up) (windmove-up)
(windmove-swap-states-up))) (windmove-swap-states-up)))
(defun priime-open-on-right ()
"Take the current window's buffer and open it on the right window."
;; This has an extremely niche usecase. When editing an OCaml project, I can
;; have multiple windows open to different buffers. I want to mirror two
;; windows such that one displays the module interface and the other displays
;; the module implementation. This allows me to set both windows to the same
;; overall "module", then quickly swap to the corresponding
;; interface/implementation.
(interactive)
(let ((buf (current-buffer)))
(priime-window-right)
(switch-to-buffer buf)))
(use-package nano-theme (use-package nano-theme
:straight '(nano-theme :type git :host github :straight '(nano-theme :type git :host github
:repo "rougier/nano-theme") :repo "rougier/nano-theme")