0

I want electric-indent or more generally, hitting ENT, to indent the new line to the beginning of text. I'd like this to work with auto-fill as well.

Before:

1. This is a long list item that I'll wrap at 50
chars. This is what happens.
2. Next item.

After:

1. This is a long list item that I'll wrap at 50
   chars. This is what I want.
2. Next item.

I'd even accept a solution that let's me fix this after the fact, meaning I'm okay with highlighting the region and entering a command that indents it the way I want. Something built-in preferred.

young_souvlaki
  • 526
  • 2
  • 13

2 Answers2

1

What you want is either outline-mode or org-mode, both of which will give you this behavior.

Phil Hudson
  • 1,651
  • 10
  • 13
0

In markdown-mode, auto-fill will indent as desired.

It also has convenient functions for adding a new list item (markdown-insert-list-item) and re-numbering a list (markdown-cleanup-list-numbers), while staying very close to text-mode.

young_souvlaki
  • 526
  • 2
  • 13