LaTeXTools icon indicating copy to clipboard operation
LaTeXTools copied to clipboard

Wrap with | (vertical bar) like brackets

Open AllanLRH opened this issue 11 years ago • 1 comments

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)|

AllanLRH avatar Jun 06 '13 18:06 AllanLRH

Thank you!

ankitp94 avatar May 24 '22 21:05 ankitp94