Automatically keep numbered list ordered in editor (adding/removing/swapping/pasting)

Use case or problem

When creating an ordered list in editor mode, Obsidian by default will auto-increment the new line item automatically.

1. Blue
2. Red
3. Yellow
4. Green
5. Cyan

However, if the user needs to rearrange items, such as moving Cyan to position two, this requires manual changes to get the list to update properly. Using Obsidian’s swap line up shortcut, this would result in:

1. Blue
5. Cyan
2. Red
3. Yellow
4. Green

Proposed solution

Since the user wants to use an ordered list, I’m making the assumption that Obsidian should automatically update the ordered list to the correct number when existing items are moved up and down in a list

Current workaround (optional)

User needs to manually update all numbers.

Some may propose that we allow the user to use the following markdown pattern to avoid ordering at all

1. Blue
1. Red
1. Yellow
1. Green
1. Cyan

But I do think it’s valuable to actually see what number each item is. I’m just thinking it’d be a good UX enhancement to have Obsidian manage that for us instead.

22 Likes