Emacs replicates M-RET org-mode functionality in first mode

In org-mode, typing M-RETat the end of the heading, you will create a new heading of the same level in a new line. Can I repeat this function in rst-mode(especially for lists)? M-RETNot currently defined, and it would be great if I could just click M-RETand rst-modeintelligently add a different list title. For instance,

- Item1 <M-RET>

is having

- Item1
- 

automatically.

+5
source share
1 answer

, rst.el, Emacs, , . rst.el Subversion load-path. rst-mode rst-insert-list:

(eval-after-load "rst"
  '(progn 
     (define-key rst-mode-map (kbd "<M-RET>")
       (lambda ()
         (interactive)
         (rst-insert-list)))))

M-RET .

Stefan Merten .

Emacs reStructuredText .

+3

All Articles