emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil-lisp-state 0ddcc908e8 084/125: `RET` is for indent ne


From: ELPA Syncer
Subject: [nongnu] elpa/evil-lisp-state 0ddcc908e8 084/125: `RET` is for indent next line
Date: Thu, 6 Jan 2022 04:58:43 -0500 (EST)

branch: elpa/evil-lisp-state
commit 0ddcc908e847ca1f371a2023f6e83cdd846aec5c
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>

    `RET` is for indent next line
---
 README.md          | 3 ++-
 evil-lisp-state.el | 8 +++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index a3f5e29a6e..2c8b32e15c 100644
--- a/README.md
+++ b/README.md
@@ -111,6 +111,7 @@ Key Binding   | Function
 `d`           | evil-delete
 `h`           | next char
 `i`           | evil-insert-state
+`I`           | evil-insert-line
 `j`           | next visual line
 `k`           | previous visual line
 `l`           | next char
@@ -171,7 +172,7 @@ Key Binding   | Function
 `<tab> y`     | sp-backward-copy-sexp
 `backspace`   | sp-backward-delete-char
 `S-backspace` | sp-delete-char
-`RET`         | sp-newline (stay in `lisp state` see `o` to switch to `insert 
state`)
+`RET`         | indent next line
 
 ## Thanks
 
diff --git a/evil-lisp-state.el b/evil-lisp-state.el
index 37b2e99d46..e833241489 100644
--- a/evil-lisp-state.el
+++ b/evil-lisp-state.el
@@ -171,7 +171,7 @@ of COMMAND.
 (evil-lisp-state-define-key     "Y"    copy-sexp t)
 (define-key evil-lisp-state-map (kbd "<backspace>") 'sp-backward-delete-char)
 (define-key evil-lisp-state-map (kbd "<S-backspace>") 'sp-delete-char)
-(define-key evil-lisp-state-map (kbd "RET") 'sp-newline)
+(define-key evil-lisp-state-map (kbd "RET") 'evil-lisp-state-indent-next-line)
 
 (defun evil-lisp-state-eval-sexp-end-of-line ()
   "Evaluate the last sexp at the end of the current line."
@@ -228,4 +228,10 @@ of COMMAND.
     (sp-insert-pair "(")
     (indent-for-tab-command)))
 
+(defun evil-lisp-state-indent-next-line ()
+  "Indent line and go the next visual line."
+  (interactive)
+  (join-line 1)
+  (sp-newline))
+
 (provide 'evil-lisp-state)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]