onlyafly / number-headings-obsidian

Automatically number headings in a document in Obsidian
MIT License
104 stars 11 forks source link

Multiple Digits #47

Open hardheadjed opened 1 year ago

hardheadjed commented 1 year ago

Is it possible to use multiple digits in each heading level as a format, e.g. 01, 002, 103, etc.?

onlyafly commented 1 year ago

No, but interesting idea. What is the use case?

hardheadjed commented 1 year ago

I've organized my folders and files using the Johnny Decimal classification system and I'm making notes with headings representing different areas and categories, which have corresponding ID numbers.

Not sure how familiar you are with the system, but as an example, one folder structure may be 00 Writing > 00 Prose and another may be 00 Writing > 01 Poetry, where 00 Writing contains folders labeled 00 to 09. At a glance I'll know that anything starting with 0 in my summary is a writing and anything starting with 01 would be poetry, etc.

I could approximate what I want without multiple digits, but the numbers would be off. I can have headings start from 10 if I wanted, but I couldn't have anything starting with a zero and I'm not sure if I can have anything after the first level have two digits either.

It's a minor thing, tbh, and I'm not sure how much trouble it'd be to implement.

Windexhammer commented 1 year ago

Just to add another use case for this: I use dataview to surface tasks and group them by heading. I want it to sort in the same order as the original doc: 1.1 - etc 1.1.1 - some other task 1.2 - more tasks But as it is I get this instead: 1.1 - etc 1.1.1 - some other task 1.10 - tasks from way further down 1.11 - and more 1.12 - you get the point 1.2 - more tasks

Ideally I'd be able to specify the full outline string: "00.00.00.00 -"