diff options
Diffstat (limited to '.config/emacs/editing.el')
-rw-r--r-- | .config/emacs/editing.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.config/emacs/editing.el b/.config/emacs/editing.el index 1920c91..f635705 100644 --- a/.config/emacs/editing.el +++ b/.config/emacs/editing.el @@ -144,4 +144,16 @@ screen after scrolling." (interactive) (mm-do-and-center #'cua-scroll-up)) +(defun e/open-line (arg) + "Insert and move to a new empty line after point. +With prefix argument ARG, inserts and moves to a new empty line before +point." + (interactive "P") + (end-of-line) + (newline-and-indent) + (when arg + (transpose-lines 1) + (previous-line 2) + (end-of-line))) + (provide 'editing) |