I did an update to the plugin Smarter hotkeys and that’s doing this now.
I’m using ctrl 1 & ctrl 2 with the command increase / decrease heading level
Thanks. Exactly what I was looking for.
I tried this step by step, but I get the following error:
Could it be because I saved the js-file in a subfolder (my-vault/obsidian-plugins/scripts/js-file)?
Any solutions?
You shouldn’t keep Templater user functions scripts in the same folder as other javascript files, so if that’s the case then Templater will fail on all files not following the correct syntax for a user functions.
So you should have a dedicated folder these user functions files, and most likely that will sort out your issue, @CurlyDandelion . If it doesn’t resolve it, you should post in Help showcasing the actual error you get from Developers Tool in the Console pane, alongside with the actual javascript you’ve used.
I made an account, just to like this reply
That’s the best solution, I would say
Thanks! it works for me!
Any way to assign a HotKey to one specific pattern though (or do I have to pick the pattern from a popup every time)?
Am I missing something obvious or can you simply use Ctrl+H to replace "## " (space at the end) with "# " or "# " with "## " to promote or demote all headings?
You could but this is so much more intuitive
(and less keystrokes )
That’s exactly how I do it. I love Markdown, because it makes some format editing tasks really simple.
Disclaimer: I like to edit notes in source mode.
I’m using the commands “Lower heading level” and “Upper heading level” of the Text Format Plugin for this.
what is? Linter?
To prevent the decrease heading levels rule from removing your level 1 headings you can change the “from” and “to” patterns as follows:
from: “^#(#+)”
to:: “$1”
This change means it will only ever decrease headings that are at level 2 or higher.