diff options
author | dx <aryadevchavali1@gmail.com> | 2020-05-25 01:50:51 +0100 |
---|---|---|
committer | dx <aryadevchavali1@gmail.com> | 2020-05-25 01:50:51 +0100 |
commit | 8f8f39ab2430489000bb1d84a07e83263b301f1a (patch) | |
tree | bb2d1000496a9001cc8040ebed302566160b62a4 | |
parent | 727c133c26d4c9696fe295208579a2d967773be0 (diff) | |
download | dotfiles-8f8f39ab2430489000bb1d84a07e83263b301f1a.tar.gz dotfiles-8f8f39ab2430489000bb1d84a07e83263b301f1a.tar.bz2 dotfiles-8f8f39ab2430489000bb1d84a07e83263b301f1a.zip |
+binding to open newlines without using o/O
-rw-r--r-- | Doom/.doom.d/org/config.org | 11 |
1 files changed, 11 insertions, 0 deletions
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 |