Facing the same issue mentioned by @Spduck . However, when you go to preview mode the numbering corrects itself but it goes back to incorrect order when switching to editing mode again.
Thatâs just markdown; the numbering in source doesnât matter until itâs rendered. You can change every number to 1.
and it will be replaced with the correct ordinal at render time (reading view, print, publish, etc)
Iâll just throw my related issue in here as well.
Pressing Shift-Tab
on a list correctly updated the number for the level it is moved to, but pressing Enter
on an empty lines only changes the indent while keeping the number the same
Anyone have a solution to fix list numbering in edit mode? A âRenumber Listâ command that could be called from the command palette or bound to a hotkey would be excellentâŚ
also, related post: What is the easiest way to renumber lists?
If you get wrong numbering from pressing Enter twice, you can undo or reindent and then use Shift+Tab to get the right behavior.
Whenever renumbering gets worked on, remember copy/cut and paste scenarios:
Set hotkey for âToggle number listâ. Place the cursor anywhere in the list and press hotkey twice. It would work.
So seeing as adding new lines to a numbered list works automatically. Itâs really weird that the application, at this stage in development, still has this problem. Where if you delete a line, the numbers donât auto fix itself.
-
yeah I can use a plugin to fix them
But we shouldnât need to, it should be automatic/instant -
yeah it doesnât matter in reading mode
I donât use reading mode, most people probably donât. They use Live Preview
I would also expect automatic list reordering to be default behavior. After all, it is what the user actually wants 100% of the time. Yeah, you can do it manually with the tab/shift-tab dance, but the whole point of an advanced Markdown editor is that you donât do everything manually yourself.
So yeah, +1 from me
BTW, noticed just recently in Mastodon that Erin Kissane was checking out new software for note taking and dropped Obsidian from the shortlist because of the missing reordering. (She ended up staying in Notion.)
I also agree that this feature will be very useful. Typora handles this by default.
Would love this feature, and a suggested solution Iâve seen elsewhere is a generic ordered list indicator (#) to keep existing functionality intact:
#)
#)
#)
Resolves to:
A generic indicator would be incompatible with other Markdown apps.
Kinda new user, so I just encountered this, today.
I was moving items in the list up and down in the list (hotkey alt+arrow, for me), and the numbers didnât change.
While I definitely think a formal solution is needed, I have found a decent workaround:
- Goto the first item in the list.
- Change the number to 1.
- Put your cursor at the start of the text on the next line.
- Backspace until youâve deleted the number on that line, and continue until that text is on the end of the previous line (the line now numbered 1).
- Hit Enter.
- The text will jump to the next line, numbered as 2, and all of the subsequent lines will reorder correctly.
- This works independently at each indent level. So, if first level of the list is out of order, and then one point has a sub list that is also out of order, you will have to repeat the process on that sub list.
When this happened to me, the first thing I looked for was some right-click functionality like âReorder List.â
Would be nice if you could just right-click anywhere in a numbered list and it would show this option, and it would renumber the entire thing at every indent point.
A simpler workaround mentioned in another comment is to indent and then unindent the top list item.
Problem: I attempted to append â5. Figâ after â4. Dateâ (by first clicking at the end of â4. Dateâ and then pressing Enter), but all nodes from â2. Sunflowerâ and beyond were erroneously renumbered.
Methods attempted: I tried clicking on âSunflowerâ, then indenting and unindenting, but it proved ineffective, as shown in the GIF.
I tried toggling number list (by collapsing internal nodes, switching to bullet points, and then back to numbered lists), as illustrated in the GIF. It did indeed restore the numbering in the target layer, but it had a severe side effect: all the numbers in the internal number list became â1,â and all internal bullet lists were converted into number lists. This solved one issue but created more significant issues.
Question: Do the tab/shift-tab trick and the toggle number list trick mentioned in previous posts genuinely have no effect in this scenario, or are they effective, just I was using them incorrectly?
Wow, thatâs strange. Try it without selecting the whole list â just put the cursor in the topmost list item and indent and unindent it. (That behavior youâre seeing probably shouldnât be happening, tho.)
Thank you. this trick indeed fixes the numbering for the current level, but somehow disrupts the numbering for the next level. As shown in the GIF⌠However, there seems a workaround found during the tests: using Shift+Enter after â4.Dateâ seems can prevent automatic renumbering of Sunflower and its subsequent items. Still quite troublesome, but well better than nothingâŚ
BTW, it seems that whether âSunflowerâ and its subsequent items are renumbered depends on whether Mapleâs internal levels include bullet lists. As shown in the GIF, if thereâs a bullet list inside, Sunflower gets incorrectly renumbered. If thereâs not, Sunflower remains unaffected (just sharing a small finding).
Looks like there may be some bugs here worth reporting (if they havenât been already).
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.