Screen line motion now works as originally envisioned
This commit is contained in:
parent
28e07fc8f8
commit
c9e55e8c3b
@ -17,6 +17,17 @@
|
|||||||
(defun mitch/evil-config ()
|
(defun mitch/evil-config ()
|
||||||
"A batch of commands to run as the :config of evil's `use-package'.
|
"A batch of commands to run as the :config of evil's `use-package'.
|
||||||
Made solely to reduce lines in the init-file."
|
Made solely to reduce lines in the init-file."
|
||||||
|
;; Visual moving
|
||||||
|
(defun move-screen-down-line ()
|
||||||
|
"Scroll down line but keep cursor in same visual position."
|
||||||
|
(interactive)
|
||||||
|
(evil-previous-line)
|
||||||
|
(scroll-down-line))
|
||||||
|
(defun move-screen-up-line ()
|
||||||
|
"Scroll up line but keep cursor in same visual position."
|
||||||
|
(interactive)
|
||||||
|
(evil-next-line)
|
||||||
|
(scroll-up-line))
|
||||||
;; Make evil-join combine lines. Taken from https://github.com/hlissner/doom-emacs/commit/40cf6139ed53b635fec37ce623c4b1093c78a11e
|
;; Make evil-join combine lines. Taken from https://github.com/hlissner/doom-emacs/commit/40cf6139ed53b635fec37ce623c4b1093c78a11e
|
||||||
;; (evil-define-operator +evil-join-a (beg end)
|
;; (evil-define-operator +evil-join-a (beg end)
|
||||||
;; "Join the selected lines.
|
;; "Join the selected lines.
|
||||||
|
@ -73,12 +73,8 @@
|
|||||||
(general-define-key
|
(general-define-key
|
||||||
:states 'normal
|
:states 'normal
|
||||||
"<escape>" 'evil-beginning-of-line
|
"<escape>" 'evil-beginning-of-line
|
||||||
"j" (general-key-dispatch 'evil-next-visual-line
|
"C-n" 'move-screen-up-line
|
||||||
:timeout 0.025
|
"C-p" 'move-screen-down-line)
|
||||||
"j" 'scroll-up-line)
|
|
||||||
"k" (general-key-dispatch 'evil-previous-visual-line
|
|
||||||
:timeout 0.025
|
|
||||||
"k" 'scroll-down-line))
|
|
||||||
(general-define-key
|
(general-define-key
|
||||||
:states 'insert
|
:states 'insert
|
||||||
"C-w" 'evil-window-map
|
"C-w" 'evil-window-map
|
||||||
|
Loading…
Reference in New Issue
Block a user