Skip to content

Commit

Permalink
Assign :jump to evil-{next-close,previous-open}-{brace,paren} (#1844)
Browse files Browse the repository at this point in the history
  • Loading branch information
leungbk authored Dec 12, 2023
1 parent c4f95fd commit 7e5403c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions evil-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -571,23 +571,27 @@ and jump to the corresponding one."

(evil-define-motion evil-previous-open-paren (count)
"Go to COUNT previous unmatched \"(\"."
:jump t
:type exclusive
(evil-up-paren ?\( ?\) (- (or count 1))))

(evil-define-motion evil-next-close-paren (count)
"Go to COUNT next unmatched \")\"."
:jump t
:type exclusive
(forward-char)
(evil-up-paren ?\( ?\) (or count 1))
(backward-char))

(evil-define-motion evil-previous-open-brace (count)
"Go to COUNT previous unmatched \"{\"."
:jump t
:type exclusive
(evil-up-paren ?{ ?} (- (or count 1))))

(evil-define-motion evil-next-close-brace (count)
"Go to COUNT next unmatched \"}\"."
:jump t
:type exclusive
(forward-char)
(evil-up-paren ?{ ?} (or count 1))
Expand Down

0 comments on commit 7e5403c

Please sign in to comment.