Skip to content

Commit 4951975

Browse files
committed
emacs: better indentation with evil
1 parent 36aa266 commit 4951975

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

emacs/init.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,9 @@
12351235
"List of modes that should start up in Evil Emacs state."
12361236
:type '(symbol))
12371237

1238+
;; better indentation
1239+
(define-key evil-insert-state-map (kbd "RET") 'newline-and-indent)
1240+
12381241
;; esc quits almost everywhere, Gotten from ;;
12391242
;; http://stackoverflow.com/questions/8483182/emacs-evil-mode-best-practice,;;
12401243
;; trying to emulate the Vim behaviour

emacs/readme.org

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,6 +1472,9 @@ pressing the key until it selects what you want.
14721472
"List of modes that should start up in Evil Emacs state."
14731473
:type '(symbol))
14741474

1475+
;; better indentation
1476+
(define-key evil-insert-state-map (kbd "RET") 'newline-and-indent)
1477+
14751478
;; esc quits almost everywhere, Gotten from ;;
14761479
;; http://stackoverflow.com/questions/8483182/emacs-evil-mode-best-practice,;;
14771480
;; trying to emulate the Vim behaviour

0 commit comments

Comments
 (0)