Unbracket - A Sublime Text 3 Plugin
A plugin for Sublime Text 3 that allows you to
unbracket, i.e. remove curly brackets, square brackets, or parentheses within current selection or current line.
Unbracket's behavior is similar to ParentalControl but not exactly the same. Unbracket removes curly brackets, square brackets, or parentheses in a slightly different way. See the GIF below to see this in effect.
- Unbracket attempts to be safe, which means, if no matching brackets are found, Unbracket does nothing.
- Unbracket recognizes
'as quote characters and works correctly even when the expression contains balanced, possibly nested quotes. For unbalanced, nested quotes, see Known Limitations section below.
- Unbracket was designed to work with R and Python code but may work with other programming languages too.
Unbracket is not yet available on Sublime Package Manager. You can simply clone the repository inside
# MacOS cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages git clone https://github.com/ankur-gupta/Unbracket.git # Linux cd ~/.config/sublime-text-3/Packages git clone https://github.com/ankur-gupta/Unbracket.git
Unbracket comes with these default key bindings out of the box but you can change them.
Command+Shift+[ to unbracket
Control+Shift+[ to unbracket
- Unbracket cannot handle multiple lines. If your expression spans multiple lines, unbracket will likely not do anything.
- Unbracket cannot handle nested quotes. As an example, unbracket cannot handle
"'". But, unbracket should work fine on balanced nested quotes like