I’m working on a project to archive some interactive fiction games from old magazine scans. Is there a way to set a keyboard shotcut so that when I highlight the 88 in “go to 88” the shortcut creates a headline link within the document - [[#88]] - as currently I’m stuck typing the hash every time and then creating a link with the keyboard shortcut.
Things I have tried
I’ve checked the defaul hotkeys and searched for a custom shortcut option in the plugin library but no joy (AFAICS)
Numeric block ids are not usually allowed (see HTML - The id attribute). You want to create an inline template and set a keyboard shortcut to it—in this case producing this text: [[#. You can do this using Templater community plugin.
[[#<cursor is here>|the display text for the link you want to create]]
The beautiful thing is that when you cursor is there, Obsidian will display interactive suggestions. I haven’t tested that template but I believe it should work fine.
The easiest version would be to have a template like:
[[#<% tp.file.selection() %>]]
Assign this template to a hotkey from Settings > Templater. Now when you select the header text, it’ll insert the brackets around your selection. Do note this require a full header to be selected for the link to work.