fix(emacs): add small window keybind
This commit is contained in:
parent
b2f1784d02
commit
cb29a3a9d8
2 changed files with 15 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue