Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow navigation for braces and brackets with j/k. #18

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions evil-lisp-state.el
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
;; `leader H' | go to previous sexp
;; `leader i' | switch to `insert state`
;; `leader I' | go to beginning of current expression and switch to `insert state`
;; `leader j' | next closing parenthesis
;; `leader j' | next closing parenthesis/bracket/brace
;; `leader J' | join expression
;; `leader k' | previous opening parenthesis
;; `leader k' | previous opening parenthesis/bracket/brace
;; `leader l' | next symbol
;; `leader L' | go to next sexp
;; `leader p' | paste after
Expand Down Expand Up @@ -274,13 +274,13 @@ If `evil-lisp-state-global' is non nil then this variable has no effect."
(sp-wrap-with-pair "("))

(defun evil-lisp-state-next-paren (&optional closing)
"Go to the next/previous closing/opening parenthesis."
"Go to the next/previous closing/opening parenthesis/bracket/brace."
(if closing
(let ((curr (point)))
(forward-char)
(unless (eq curr (search-forward ")"))
(unless (eq curr (search-forward-regexp "[])}]"))
(backward-char)))
(search-backward "(")))
(search-backward-regexp "[[({]")))

(defun lisp-state-prev-opening-paren ()
"Go to the next closing parenthesis."
Expand Down