S-RET -> insert literal newline
A convention on many text editors and applications is to make RET auto-indent new lines. That has already been done. Another convention is for S-RET to insert an unindented line; this commit adds this convention to Doom. Relevant to #3694
This commit is contained in:
parent
9a5175dd0e
commit
863eb82efd
5 changed files with 19 additions and 8 deletions
|
@ -271,6 +271,15 @@ If on a:
|
|||
(org-element-property :begin context)
|
||||
(org-element-property :end context)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/shift-return (&optional arg)
|
||||
"Insert a literal newline, or dwim in tables.
|
||||
Executes `org-table-copy-down' if in table."
|
||||
(interactive "p")
|
||||
(if (org-at-table-p)
|
||||
(org-table-copy-down arg)
|
||||
(org-return nil arg)))
|
||||
|
||||
|
||||
;; I use these instead of `org-insert-item' or `org-insert-heading' because they
|
||||
;; impose bizarre whitespace rules depending on cursor location and many
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue