branch: elpa/evil-lisp-state
commit 33ce3bb4f52407058d8cfd5d45092b9d9db1d5a1
Author: syl20bnr <[email protected]>
Commit: syl20bnr <[email protected]>
Tweak navigation model to make it ever simpler
Version 3.0
---
README.md | 34 ++++++++++++++++------------------
evil-lisp-state.el | 20 +++++++++++---------
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/README.md b/README.md
index 0692569b02..850b3448d2 100644
--- a/README.md
+++ b/README.md
@@ -76,17 +76,15 @@ version `sp-backward-slurp-sexp` with `<tab>s`.
A lot of experimentation led to the following navigation model which should
hopefully be a lot more accessible than the other models.
+`hjkl` behaves like in the default `normal state`.
+
**Next sexp on the same level (sibling)**
-- `l` next sexp
-- `h` previous sexp
+- `L` next sexp
+- `H` previous sexp
**Change level (parent/children)**
-- `j` go to next sexp one level down
-- `k` go to previous one level up
-
-**Enter inside an sexp**
-- `L` next symbol
-- `H` previous symbol
+- `J` go to next sexp one level down
+- `K` go to previous one level up
And that's it! All these commands always put the point _at the beginning_ of
the sexp. Use the regular `e` binding to go at the end of a word.
@@ -121,18 +119,18 @@ Key Binding | Function
`<tab>dw` | sp-backward-kill-word
`D` | evil-delete-line
`gs` | go to source of symbol under point
-`h` | previous sexp at the same level
-`H` | previous symbol
+`h` | next char
+`H` | previous sexp at the same level
`i` | evil-insert-state
-`j` | next sexp one level down
-`J` | next visual line
-`k` | previous sexp one level up
-`K` | previous visual line
-`l` | next sexp of the same level
-`L` | next symbol
+`j` | next visual line
+`J` | next sexp one level down
+`k` | previous visual line
+`K` | previous sexp one level up
+`l` | next char
+`L` | next sexp of the same level
`m` | sp-join-sexp (think about `merge-sexp`)
-`o` | insert sexp after the current one and switch to `insert state`
-`O` | insert sexp before the current one and switch to `insert state`
+`o` | insert sexp after on the same level and switch to `insert
state`
+`O` | insert sexp before on the same level and switch to `insert
state`
`p` | evil-past-after
`P` | evil-past-before
`r` | sp-raise-sexp
diff --git a/evil-lisp-state.el b/evil-lisp-state.el
index f7d6c423f0..57d6194fc4 100644
--- a/evil-lisp-state.el
+++ b/evil-lisp-state.el
@@ -5,7 +5,7 @@
;;;; Author: Sylvain Benner <[email protected]>
;; Keywords: convenience editing evil smartparens lisp mnemonic
;; Created: 9 Oct 2014
-;; Version: 2.0.1
+;; Version: 3.0
;; Package-Requires: ((evil "1.0.9") (smartparens "1.6.1") (expand-region
"0.10.0"))
;; URL: https://github.com/syl20bnr/evil-lisp-state
@@ -119,14 +119,16 @@ of COMMAND.
(evil-lisp-state-define-key "dw" kill-word t)
(define-key evil-lisp-state-map "D" 'evil-delete-line)
(define-key evil-lisp-state-map "gs"
'elisp-slime-nav-find-elisp-thing-at-point)
-(define-key evil-lisp-state-map "h" 'evil-lisp-state-previous-sexp)
-(define-key evil-lisp-state-map "H" 'sp-backward-symbol)
-(define-key evil-lisp-state-map "j" 'evil-lisp-state-next-sexp-down)
-(define-key evil-lisp-state-map "J" 'evil-next-visual-line)
-(define-key evil-lisp-state-map "k" 'sp-backward-up-sexp)
-(define-key evil-lisp-state-map "K" 'evil-previous-visual-line)
-(define-key evil-lisp-state-map "l" 'sp-next-sexp)
-(define-key evil-lisp-state-map "L" 'evil-lisp-state-forward-symbol)
+(define-key evil-lisp-state-map "h" 'evil-backward-char)
+(define-key evil-lisp-state-map (kbd "C-h") 'sp-backward-sexp)
+(define-key evil-lisp-state-map "H" 'evil-lisp-state-previous-sexp)
+(define-key evil-lisp-state-map "j" 'evil-next-visual-line)
+(define-key evil-lisp-state-map "J" 'evil-lisp-state-next-sexp-down)
+(define-key evil-lisp-state-map "k" 'evil-previous-visual-line)
+(define-key evil-lisp-state-map "K" 'sp-backward-up-sexp)
+(define-key evil-lisp-state-map "l" 'evil-forward-char)
+(define-key evil-lisp-state-map (kbd "C-l") 'evil-lisp-state-forward-symbol)
+(define-key evil-lisp-state-map "L" 'sp-next-sexp)
(define-key evil-lisp-state-map "m" 'sp-join-sexp)
(define-key evil-lisp-state-map "o" 'evil-lisp-state-insert-sexp-after)
(define-key evil-lisp-state-map "O" 'evil-lisp-state-insert-sexp-before)