~dx:newline function config.org -> personal.org
This commit is contained in:
@@ -571,15 +571,6 @@ General keymap
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** Non-leader
|
*** Non-leader
|
||||||
#+BEGIN_SRC elisp
|
#+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!
|
(map!
|
||||||
:n "TAB" #'evil-jump-item
|
:n "TAB" #'evil-jump-item
|
||||||
:n "M-v" #'dx:newline
|
:n "M-v" #'dx:newline
|
||||||
|
|||||||
@@ -71,3 +71,15 @@ Function to quickly check weather, which is what I wanted wttrin for.
|
|||||||
(interactive)
|
(interactive)
|
||||||
(wttrin (dx:password-store/get-password "location")))
|
(wttrin (dx:password-store/get-password "location")))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
* Newline
|
||||||
|
Insert a newline without having to exit normal mode!
|
||||||
|
#+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)))
|
||||||
|
#+END_SRC
|
||||||
|
|||||||
Reference in New Issue
Block a user