Sublime Wrapper is a sublime plugin which can wrap selected content with specific code like if
, if/else
, for
, etc. Supporting syntax includes PHP
, Python
, Javascript
, JSON
, highly inspired by PHPStorm's built-in surround feature.
Using Git
Packages
directory.(Preferences > Browse Packages
).git clone https://github.com/lattespirit/sublime-wrapper.git
.Using zip File
Preferences > Browse Packages…
menu.SublimeWrapper
."super/ctrl+k, super/ctrl+s"
("super"
means Command
key in OSX) to trigger the command as default. If this key binding conflicts with the one in your environment, remap it to your favorite one without hesitation.
[
{
"keys": ["super/ctrl+k", "super/ctrl+s"], "command": "activate_wrap"
}
]
tab
and jump to the next field. FYI, jumping to prev fields is NOT supported.Vintage Mode
is enabled and select a whole line or multiple lines in Visual Mode
, trigger the key binding and wrap the selected contents. Then the whole view contents will be screwed up. Kind of nightmare.