In org-mode
, typing M-RET
at the end of a headline will create a new headline of the same level on a new line. Can I replicate this functionality in rst-mode
(especially for lists)? Currently M-RET
is not defined, and it would be great if I can just press M-RET
and rst-mode
would intelligently add another list header. For example,
- Item1 <M-RET>
renders
- Item1
-
automatically.
It turns out that the rst.el
included in the particular version of Emacs I'm using is old. You can get the newer rst.el
from the Subversion repository, and put it into your load-path
. Then, you can make rst-mode
specific key binding to rst-insert-list
:
(eval-after-load "rst"
'(progn
(define-key rst-mode-map (kbd "<M-RET>")
(lambda ()
(interactive)
(rst-insert-list)))))
Then you can use M-RET
to make new list.
Thanks for Stefan Merten for his kind instructions in the mailing list.
You can also take a look at the Installation section of the Emacs Support for reStructuredText documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With