Wrap
🤖 Sublime Text plugin that "passes" text selected or under cursor into brackets
Details
Installs
- Total 311
- Win 198
- Mac 62
- Linux 51
Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
🤖 Wrap
Wrap is a simple but useful Sublime Text plugin that wraps the selected text (or text under cursor) with brackets (example: pass as argument into function/method, pass as index/key into array/list).
🎬 Demonstration
💻 Installation
The easiest way to install Wrap is through Package Control. After it is enabled inside Sublime Text, open the command palette and find Package Control: Install Package and press ENTER
. Then, find Wrap in the list. Press ENTER
again, and this plugin is installed!
📈 Usage
This plugin includes the command wrap
, which can be run in the command palette as Wrap: Wrap
.
Running the Wrap: Wrap
command, the text selected or under cursor will be wrapped by brackets (bracket type can be customized). A placeholder will be inserted before the starting bracket and become selected.
Example:
- Original code:
x
(x
is selected or under cursor) - After
Wrap: Wrap
:abc(x)
(abc
selected)
âš™ Customization
The Wrap plugin can be customized to your requirements.
🔧 Preferences
The types of brackets used by Wrap
can be customized via the command Preferences: Wrap
.
Change the default bracket type with the bracket_type
setting.
Change context-specific bracket types with the contexts
setting.
⌨ Keybindings
Keybindings can be created for the wrap
command.
- Run the
Preferences: Wrap Key Bindings
command in the command palette. - Add your keybindings!
Below is an example of the keybinding file:
[
{
"keys": ["alt+w"],
"command": "wrap"
}
]