Home / GitHub Page

Renumbering ordered lists

I’d like to see a feature to renumber ordered lists.

I recognize it doesn’t matter when rendered, but this would be useful for exporting to non-markdown tools, as well as making it easier to manage when editing a list.

Currently, we can use any number when inserting an item, and that (mostly) works, but it would be very nice to then be able to have an option to renumber the whole list.

For example:

1. This
2. is
3. a
4. list

might become:

1. This
2. is
3. a
4. longer
4. list
5. now

At this point, I’d like to select the list and use a hotkey/button/menu item to make it:

1. This
2. is
3. a
4. longer
5. list
6. now

Hi I edited your post to put the markdown lists in code blocks. Discord is also markdown based so both lists rendered the same…

I like this idea, I think it could probably be wrapped up in a generic auto format function. For example you could select a block of markdown, right click and autoformat that selection. It would hopefully work for lists, tables, generic whitespace.

Thanks! That’s what I get for not previewing my post.

I like that approach. I certainly wouldn’t want to make this a default auto-format. I imagine that would break a lot of workflows.