Skip to content

Commit

Permalink
Add g^, g0, g$
Browse files Browse the repository at this point in the history
These use the move-to-(beginning/end)-of-line. The equivilent to the
regular ^ or $ would be move-to-(beginning/end)-of-logical-line

There is also a variable marked as ignored when it is used.
  • Loading branch information
LeeLaffan committed Dec 24, 2024
1 parent 6ae0cf9 commit 8850ef8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions extensions/vi-mode/binds.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
(define-key *motion-keymap* "B" 'vi-backward-word-begin-broad)
(define-key *motion-keymap* "e" 'vi-forward-word-end)
(define-key *motion-keymap* "E" 'vi-forward-word-end-broad)
(define-key *motion-keymap* "g ^" 'move-to-beginning-of-line)
(define-key *motion-keymap* "g 0" 'move-to-beginning-of-line)
(define-key *motion-keymap* "g $" 'move-to-end-of-line)
(define-key *motion-keymap* "$" 'vi-move-to-end-of-line)
(define-key *motion-keymap* "g _" 'vi-move-to-last-nonblank)
(define-key *motion-keymap* "H" 'vi-move-to-window-top)
Expand Down
2 changes: 1 addition & 1 deletion extensions/vi-mode/ex-command.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
(lem-vi-mode/commands:vi-window-split-vertically-new 1 filename))

(define-ex-command "^vne(?:w)?$" (range filename)
(declare (ignore range filename))
(declare (ignore range))
(lem-vi-mode/commands:vi-window-split-horizontally-new 1 filename))

(define-ex-command "^ene(?:w)?$" (range filename)
Expand Down

0 comments on commit 8850ef8

Please sign in to comment.