Sublime Forum

Can't remap particular command

#1

Does anyone know what package this “HTML:Wrap Selection with tag” is associated with or is it part of Sublime Text’s base?

More importantly, how do I redefine the keyboard shortcut? I’ve tried:

{
    "keys": ["ctrl+shift+r","ctrl+w"],
    "command": "wrap_selection_with_tag" 
}

and

{
    "keys": ["ctrl+shift+r","ctrl+w"],
    "command": "html_wrap_selection_with_tag" 
}

Neither has worked. Alt+Shift+W remains the combination.

0 Likes

#2

I opened Preferences > Key Bindings and did a find in the left pane for alt+shift+w. This is the matching line* that’s found:

	{ "keys": ["alt+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/Snippets/xml-long-tag.sublime-snippet" } },

You should be able to paste that line on the right pane and then change the binding.


* I actually copied this from a Mac where the binding is ctrl+shift+w but I did the search on my Linux computer too and it looks the same except for that.

0 Likes

#3

Thank you! That solved it.

0 Likes