Select text + shortcut to mark backlink

select " Obsidian " text , and " Shift A" to mark [[Obsidian]] backlink.

You can do this now:
Select text, type [[ and it will be turned into a back link

6 Likes

Nice. ! Why I didn’t see this trick in help vault. :sweat_smile:

but there’s a little issue.
"[[ " is hit by the right hand keyboard.
Shift A is hit by left hand.

the right hand usually control mouse.

I didn’t get you.

When I select a text, and press Shift+A, the text gets replaced by “A”
When I select text and press '[[ ’ it turns into a link ! , and not a backlink, (If I understand that correctly)

He suggest to use Shift+A instead of ‘[[’.
Currently there is no ‘Shift+A’ function available.

@Steve_yang usually I use another software(such as Autohotkey) to solve all this kind of ‘issues’.

4 Likes

Thank you!

Only if you type with one hand on the keyboard. Still, I get why this doesn’t fit everyone’s way of work and I guess having a way to change this hot key would be better.

When we select text ,usually use Mouse, how to use keyboard select text ? right ? that’s a habit .
and when we change highligh something ,we usually use shortcut. . but I think just type “[[” ,it’s also shortcut.

I mean “[[” is okay. not big issue. but if have shorcut like “shift + A” will be nice !

Thank you again tell me this trick.

Here is another trick: press Shift and while holding it press the arrow keys in the direction you want to select text. Play with Shift+Ctrl + arrows and Shift+Alt+ arrows combinations for different types of selections.

1 Like

Very nice trick. !!!

Thank you so much !!!

1 Like

I use AutoHotkey to produce “[[” by single left-hand keypress. I write numbers by different method so I do not miss previous functionality.

KEYBOARD LAYOUT ILLUSTRATION:
Virtual key code on the left. 
Output on the right. 
╔════╗ ╔════╦════╦════╦════╗ 
║1B  ║ ║70  ║71  ║72  ║73  ║ 
╠════╩╦╩════╬════╩╦═══╩═╦══╩═
║C0  `║31 [[║32  2║33  3║34  
╠═════╩══╦══╩══╦══╩══╦══╩══╦═
║09   Tab║51  q║57  w║45  e║5
╠════════╩╦════╩╦════╩╦════╩╦
║14 CapsLk║41  a║53  s║44  d║
╠═════════╩══╦══╩══╦══╩══╦══╩

However it produces “[[” regardless of (not)having selected text.
I do not know if VIM mode takes into account if text is selected or not.

Here is AutoHotkey code:

; CREATE WIKILINK
#IfWinActive ahk_exe Obsidian.exe
vk31:: ; !/1 hotkey
  Send, {[ 2} 
    ; Double opening square bracket by left hand while right hand controls cursor. 
    ; useful for linking in Obsidian. 
    ; purpose: right hand selects text, left hand presses the key, Obsidian encloses selected text in square brackets. 
  return
#IfWinActive ; end restriction to ahk_exe Obsidian.exe

Proposed solution:

It would certainly be better to have native Obsidian customizable hotkey that would take into account if text is selected or not.
Now there is hotkey “Insert link” (default Ctrl+K) which produces markdown-style link and adjusts behavior depending on existence of text selection.
There could be similar version for creation of wikilinks.

Related feature requests:

It would be more efficient with:


@Steve_yang By the way, the title of this request is misleading. I would suggest to change it e.g. to “Select text + customizable hotkey to create wikilink”.
Similarly in body of original post, replace “backlink” → “link” since this request is obviously only about forward links, not backlinks.

1 Like