feat(nix): inefficiently model nvim scrolling
This commit is contained in:
parent
92ccb0b490
commit
fecd7366d1
1 changed files with 22 additions and 5 deletions
|
@ -27,6 +27,25 @@
|
|||
(kill-line)
|
||||
(meow-insert))
|
||||
|
||||
(defun meow-scroll-up ()
|
||||
"Scroll down half a page like nvim's Ctrl+D."
|
||||
(interactive)
|
||||
(let* ((scroll-amount (/ (window-height) 2))
|
||||
(scroll-margin 0))
|
||||
(dotimes (_ scroll-amount)
|
||||
(forward-line 1)
|
||||
(scroll-up 1))))
|
||||
|
||||
(defun meow-scroll-down ()
|
||||
"Scroll up half a page like nvim's Ctrl+U."
|
||||
(interactive)
|
||||
(let* ((scroll-amount (/ (window-height) 2))
|
||||
(scroll-margin 0))
|
||||
(dotimes (_ scroll-amount)
|
||||
(forward-line -1)
|
||||
(when (not (pos-visible-in-window-p (point-min)))
|
||||
(scroll-down 1)))))
|
||||
|
||||
(defun message-buffer ()
|
||||
"Switch to the *Messages* buffer."
|
||||
(interactive)
|
||||
|
@ -77,7 +96,7 @@
|
|||
(meow-leader-define-key '("u" . "C-u"))
|
||||
(meow-motion-overwrite-define-key '("<escape>" . ignore))
|
||||
(meow-normal-define-key
|
||||
'("?" . meow-cheatsheet)
|
||||
'("/" . meow-undo)
|
||||
'("*" . meow-expand-0)
|
||||
'("=" . meow-expand-9)
|
||||
'("!" . meow-expand-8)
|
||||
|
@ -111,8 +130,7 @@
|
|||
'("B" . meow-back-symbol)
|
||||
'("c" . meow-change)
|
||||
'("C" . meow-change-line)
|
||||
'("d" . meow-delete)
|
||||
'("D" . meow-backward-delete)
|
||||
'("d" . meow-scroll-up)
|
||||
'("e" . meow-line)
|
||||
'("E" . meow-goto-line)
|
||||
'("f" . meow-find)
|
||||
|
@ -139,8 +157,7 @@
|
|||
'("s" . meow-search)
|
||||
'("t" . meow-right)
|
||||
'("T" . meow-right-expand)
|
||||
'("u" . meow-undo)
|
||||
'("U" . meow-undo-in-selection)
|
||||
'("u" . meow-scroll-down)
|
||||
'("v" . meow-visit)
|
||||
'("w" . meow-next-word)
|
||||
'("W" . meow-next-symbol)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue