diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2024-10-19 17:06:43 +0200 | 
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2024-10-19 17:06:43 +0200 | 
| commit | 1effee8ec18d810ba21c208c42cd8ba6b3c24391 (patch) | |
| tree | 74e2fcb931fa6c5ff4929a19f2ff71dd87d7b5af /.config/emacs/editing.el | |
| parent | b069e5523ea03ca9c33040681d9844932b5d4da8 (diff) | |
emacs: Add e/open-line
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) |