A
A
Anton2015-12-12 10:17:31
Sublime Text
Anton, 2015-12-12 10:17:31

How to apply hotkeys to snippets in Sublime Text 3?

Everything written below refers to OS Windows 7.
Hotkeys have already been raised on the toaster, but am I so lazy that I don’t bother to deal with code like

{ "keys": ["shift+enter"], "command": "insert_snippet", "args": { "name": "Packages/XML/long-tag.sublime-snippet" } }
, or is it really difficult enough .. I don’t understand. I hope that I'm still stupid...
The task is elementary: I want the key combination "SHIFT + ENTER" to highlight at the cursor position <br />, create an empty line below and place the cursor at its beginning.
I would be grateful for a detailed presentation of the algorithm of actions. I think in the future this instruction may come in handy for many, because when switching to Sublime, everyone has the usual hot keys from the previous editors!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RuBear, 2017-09-18
@pulman

Click Preferences > Key Bindings and enter in the opened window:
[
{"keys": ["shift+enter"], "command": "insert_snippet","args": {"contents": "
"}}
]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question