Skip to content

Commit

Permalink
gI works in visual state
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdl89 committed Jul 16, 2024
1 parent fc99343 commit 81ec688
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions evil-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -2838,14 +2838,18 @@ in the next VCOUNT - 1 lines below the current one."
(interactive "p")
(evil--insert-line count vcount t))

(defun evil-insert-0-line (count &optional vcount)
(evil-define-command evil-insert-0-line (count &optional vcount)
"Switch to insert state at beginning of current line.
Point is placed at column 0, or the beginning of the visual line.
The insertion will be repeated COUNT times. If VCOUNT is
non nil it should be number > 0. The insertion will be repeated
in the next VCOUNT - 1 lines below the current one."
:keep-visual t
:type exclusive
(interactive "p")
(evil--insert-line count vcount nil))
(if (evil-visual-state-p)
(evil-beginning-of-line)
(evil--insert-line count vcount nil)))

(defun evil-append-line (count &optional vcount)
"Switch to Insert state at the end of the current line.
Expand Down

0 comments on commit 81ec688

Please sign in to comment.