Sublime Forum

Shortcut Link

#1

hey folks,
atm i am trying to program a shortcut to link a selection, but i dont know how to do it. so i thought you guys might help me

On the shortcut ctrl+m i want to link an e-mail, but i dont get it to work

i tried the following:

{ “keys”: [“ctrl+m”], “command”: “insert_snippet”, “args”: {“contents”: “a href=“mailto:”>${0:$SELECTION}”} },

Hope you guys can help me :slight_smile:

0 Likes

#2

So my problem is that i dont know how to convert the quotation marks in a hotkey

These ones: "

They produce an error:
Error trying to parse file: Unexpected character

So could you tell me how to convert it?

0 Likes

#3

put a \ before the " like

{ "keys": ["ctrl+m"], "command": "insert_snippet", "args": {"contents": "<a href=\"mailto:\">${0:$SELECTION}</a>"} },
2 Likes

#4

Thanks mate. It worked! :thumbsup:

0 Likes