LaTeXTools
LaTeXTools copied to clipboard
Wrap with | (vertical bar) like brackets
When a text is selected and |
is pressed, enclose the text in |
's. Adding the following to the keymap should add this (can be added to user keymap as well, should someone be interested):
{ "keys": ["|"], "command": "insert_snippet", "args": {"contents": "|${0:$SELECTION}|"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.tex.latex" },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
}
It's useful when using the verbatim environment for code: \verb|foo.bar(baz)|
Thank you!