You can do this with custom key mapping. Go to Preferences -> Key Bindings-User and add the following:
{ "keys": ["ctrl+super+b"], "command": "insert_snippet", "args": {"contents": "<strong>${0:$SELECTION}</strong>"} }
If the file is empty when you open it, put the first square bracket [ in the first line and the closing bracket ] in the last line. I used Ctrl Super B as a key binding because Ctrl B is already bound to the build command. ( Super is a Windows key or command key, depending on your OS and keyboard.)
To use this command, you can select what you want in the <strong> tags and press Ctrl Super B. The selection will remain selected - if you want to remove the selection and have the cursor after the closing tag, change the "contents" to this:
"<strong>$SELECTION</strong>"
Finally, after starting the key combination, you can save the selection, then press Tab to go to the end of the closing tag:
"<strong>${1:$SELECTION}</strong>$0"
source share