Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to numbered list with right numbers in markdown #16

Open
Faxix opened this issue Feb 7, 2021 · 5 comments
Open

Switch to numbered list with right numbers in markdown #16

Faxix opened this issue Feb 7, 2021 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Faxix
Copy link

Faxix commented Feb 7, 2021

Thank you for nice plugin. I love changing style of lists.
After switching to numbered/ordered list in markdown every line start with "1."
For me it is huge eye-sore. Is it possible to have list with right numbers in markdown?
(May be only after selecting and switching whole list? Changing whole list numbers after switching one line may be too much for other use-cases...)
Thank you and have a nice day

@argenos
Copy link
Owner

argenos commented Feb 8, 2021

I'll quote my reply from #6:

Regarding the first issue, I'm afraid I can't invest more time making the ordered lists smarter, that would require knowing if the line above also contains a list element, and also consider the indentation of all selected elements (which I'll be honest, is not smart either). Feel free to open a PR for it though!

While I can't invest time in a "smart" ordered list change, I will happily accept PRs if anyone wants to tackle this!

@argenos argenos added help wanted Extra attention is needed enhancement New feature or request labels Feb 8, 2021
@jayomu
Copy link

jayomu commented Oct 12, 2021

the all 1. is relly annyonying. really time consuming to change all the numbers to the "correct" numbers. wish there was way to do it one click. How is this even a issue in the first place :D

@argenos
Copy link
Owner

argenos commented Oct 12, 2021

@jayomu I'll happily accept a PR if you want to work on the fix! The 1. comes from the markdown spec (see this for more info.)

@samuel-odinware
Copy link

I happened across this and wanted to add a quick note about using all 1.s for ordered lists. If you create an ordered list but need to add an item anywhere other than the bottom of the list that would require you to renumber at least some part of the list. If this edited list is also part of a git repository it would cause the rest of the list to be reported as changed even though the items themselves have not changed. Since rendering the markdown produces the correct numbering I personally see using all 1.s as a benefit.

@berezovskyi
Copy link

I am sorry for asking here, but what did you do to enable 1-based numbering? I reorder items often (and copy lines down with Hotkey++, which is my main use case for this plugin) and actually want lists only to use 1-based indexes, but Obsidian is numbering them for me sequentially. I have Hotkey++ with pretty much default settings, Obsidian v0.14.6. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants