Skip to content
Sublime Text 3 Plugin that allows you to remove curly brackets, square brackets, or parentheses.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
Default (Linux).sublime-keymap
Default (OSX).sublime-keymap
README.md
demo
unbracket.py

README.md

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.

Demo GIF

Features

  1. Unbracket attempts to be safe, which means, if no matching brackets are found, Unbracket does nothing.
  2. Unbracket recognizes " and ' as quote characters and works correctly even when the expression contains balanced, possibly nested quotes. For unbalanced, nested quotes, see Known Limitations section below.
  3. Unbracket was designed to work with R and Python code but may work with other programming languages too.

Installation

Unbracket is not yet available on Sublime Package Manager. You can simply clone the repository inside Packages folder.

# 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

Usage

Unbracket comes with these default key bindings out of the box but you can change them.

MacOS: Command+Shift+[ to unbracket

Linux: Control+Shift+[ to unbracket

Known Limitations

  1. Unbracket cannot handle multiple lines. If your expression spans multiple lines, unbracket will likely not do anything.
  2. Unbracket cannot handle nested quotes. As an example, unbracket cannot handle "'". But, unbracket should work fine on balanced nested quotes like "''".
You can’t perform that action at this time.