Created
April 18, 2013 21:05
-
-
Save syl20bnr/5416218 to your computer and use it in GitHub Desktop.
This gist add functions to insert lines above and below the current line without changing the current evil state and current point position.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; insert one or several line below without changing current evil state | |
(defun evil-insert-line-below (count) | |
"Insert one of several lines below the current point's line without changing | |
the current state and point position." | |
(interactive "p") | |
(save-excursion | |
(evil-save-state (evil-open-below count)))) | |
;; insert one or several line above without changing current evil state | |
(defun evil-insert-line-above (count) | |
"Insert one of several lines above the current point's line without changing | |
the current state and point position." | |
(interactive "p") | |
(save-excursion | |
(evil-save-state (evil-open-above count)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO: remove whitespaces on the created lines