My question is essentially identical to an older one on this forum, at $SELECTION snippet .
I have tried following the advice given in the answer to this question and failed.
On my Mac I have a snippet as follows, intended to simply wrap the selected text into phpBB italic tags :
<snippet>
<content><![CDATA[ [i]$SELECTION[/i] ]]></content>
<tabTrigger>ita</tabTrigger>
</snippet>
It works if I select a portion of text, and go to Tools>Snippets in the menu.
But of course I’m interested in a faster, keyboard-only way to do this.
Following the advice in the abovementioned answer, in the SublimeText menu I go
to Sublime Text > Preferences > Key Bindings, and I am presented with what the following two-paned view :
So I typed the following code in the right pane, and saved :
[
{ “keys”: [“ctrl+alt+i”], “command”: “wrap_in_phpbb_ita_tags”, “args”: {“name”: “Packages/User/phpbb_italics.sublime-snippet” } }
]