When I'm editing a markdown-mode document with a list like this:
* foo
* bar
* baz
and my cursor is at the very end of the baz
line, and I press RET
(which is bound to markdown-enter-key
) then the baz
line gets dedented so the file looks like this:
* foo
* bar
* baz
But what I would like is for the indentation to behave like most programming modes, i.e. keep baz
where it was, and on the newline align my cursor with the baz
bullet point so I can start typing another bullet point at that level, e.g.
* foo
* bar
* baz
*
How can I configure my emacs to do this?
M-RET
('markdown-insert-list-item').RET
do that (or that without the*
).M-RET
to indent list items, instead of trying to makeRET
to do different things base on context (but that context is probably not enough and will produces ambiguity and instability, for example, when to start and end a list is unexpected, which means you always have to do it manually). But I do know some markdown editors (e.g., github.com/uranusjr/macdown) do what you requested, so I guess you can try to implement it yourself and/or talk to the markdown-mode author.