From 8f8f39ab2430489000bb1d84a07e83263b301f1a Mon Sep 17 00:00:00 2001 From: dx Date: Mon, 25 May 2020 01:50:51 +0100 Subject: +binding to open newlines without using o/O --- Doom/.doom.d/org/config.org | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Doom') diff --git a/Doom/.doom.d/org/config.org b/Doom/.doom.d/org/config.org index f4d198e..06a3edf 100644 --- a/Doom/.doom.d/org/config.org +++ b/Doom/.doom.d/org/config.org @@ -570,8 +570,19 @@ General keymap #+END_SRC *** Non-leader #+BEGIN_SRC elisp +(defun dx:newline (&optional BACKWARD) + (interactive) + (message "%s" BACKWARD) + (let ((old (point))) + (cond ((and BACKWARD (= BACKWARD 1)) (+default/newline-above)) + (t (+default/newline-below))) + (goto-char (+ old 1)) + (evil-normal-state))) + (map! :n "TAB" #'evil-jump-item + :n "M-v" #'dx:newline + :n "M-V" #'(lambda () (interactive) (dx:newline 1)) :v "M-c" #'count-words-region :n "M-s" #'occur) #+END_SRC -- cgit v1.2.3-13-gbd6f