Indent driven auto heading creation mode

Sometimes you just want to flesh out an outline using headings with automatically added hashtags based on your indentation level. This would allow you to indent multiple tabs without it commenting out, for example creating an h2 heading then return and tab twice to automatically add the four hashtags and space for the h4 heading.

It would also be nice if you could take a numbered, bulleted, or checkbox list and apply this auto heading creation after the fact, with option to remove the brackets, dashes, and number formatting.

As a side note, it would be cool if these indented headings had an option to be previewed with indentation.

As an extra bonus, maybe selecting and copying a folded heading line in this mode would not only copy the folded headings, but also adjust them to match the proper relative heading level based on the cursor’s indentation when the paste occurs.

Thanks.

4 Likes

I was trying to come up with my own workaround for this and tried to come up with a Search and Replace tactic to be able to search a Tab Dash Space as opposed to a Tab Tab Dash Space in such a way that I would only return the Tab Dash Space for the ones where the line was indented once.

If anyone knows how to do this, it would be helpful in converting a note that was set up as an indented list into a note that is set up with headings.

Dash Space β€”> H1 Heading
Tab Dash Space β€”> H2 Heading
Tab Tab Dash Space β€”> H3 Heading
Tab Tab Tab Dash Space β€”> H4 Heading
Tab Tab Tab Tab Dash Space β€”> H5 Heading
Tab Tab Tab Tab Tab Dash Space β€”> H6 Heading

Thanks in advance.

1 Like

This can be done in VSCode using search and replace utilizing search and replace with a new line and the specific number of spaces for the indents rather than trying to use tabs like I was suggesting before.