branch: elpa/evil-lisp-state
commit 12f974b74d14da442ee8c19ab719d49df463ea8d
Author: mahinshaw <[email protected]>
Commit: syl20bnr <[email protected]>
Allow navigation for braces and brackets with j/k.
---
evil-lisp-state.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/evil-lisp-state.el b/evil-lisp-state.el
index 89f83b7625..969f73b518 100644
--- a/evil-lisp-state.el
+++ b/evil-lisp-state.el
@@ -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
@@ -285,13 +285,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."