All Projects → Pustelto → Bracketeer

Pustelto / Bracketeer

Licence: MIT License
VS Code extension for easy and quick manipulation with brackets and quotes.

Programming Languages

javascript
184084 projects - #8 most used programming language
ruby
36898 projects - #4 most used programming language
python
139335 projects - #7 most used programming language
HTML
75241 projects
CSS
56736 projects
powershell
5483 projects
shell
77523 projects

Projects that are alternatives of or similar to Bracketeer

tabout
Tab out of quotes, brackets, etc for Visual Studio Code
Stars: ✭ 67 (+109.38%)
Mutual labels:  quotes, brackets
VSCoding-Sequence
VSCode Extension for interactively visualising protein structure data in the editor
Stars: ✭ 41 (+28.13%)
Mutual labels:  vscode-extension
vscode-react-component-generator
A VSCode extension that generates a new React component with its files automatically in VSCode.
Stars: ✭ 18 (-43.75%)
Mutual labels:  vscode-extension
wikiquote
Retrieve quotes from any Wikiquote article.
Stars: ✭ 86 (+168.75%)
Mutual labels:  quotes
vscode-fortran-support
Fortran language support for Visual Studio Code
Stars: ✭ 49 (+53.13%)
Mutual labels:  vscode-extension
TournamentBrackets
Android project written in Java to display Tournaments brackets with animation
Stars: ✭ 39 (+21.88%)
Mutual labels:  brackets
AutoIt-VSCode
AutoIt Extension for Visual Studio Code
Stars: ✭ 51 (+59.38%)
Mutual labels:  vscode-extension
vscode-django
Beautiful syntax and snippets for perfectionists with deadlines
Stars: ✭ 113 (+253.13%)
Mutual labels:  vscode-extension
vscode-openxml-explorer
OpenXML Explorer extension for VS Code
Stars: ✭ 16 (-50%)
Mutual labels:  vscode-extension
px2rem-plus-vscode
Convert px to rem extension for Visual Studio Code.
Stars: ✭ 21 (-34.37%)
Mutual labels:  vscode-extension
vscode-csproj
📕 Visual Studio Code extension to keep your csproj files up to date.
Stars: ✭ 19 (-40.62%)
Mutual labels:  vscode-extension
popping-and-locking-vscode
Vivid and well balanced syntax for VS Code.
Stars: ✭ 26 (-18.75%)
Mutual labels:  vscode-extension
AppWorks
🐻 基于 VS Code 插件的前端研发工具集,站点国内镜像:https://apptools.gitee.io
Stars: ✭ 788 (+2362.5%)
Mutual labels:  vscode-extension
python-forex-quotes
Library to fetch and parse realtime Forex quotes and convert currencies
Stars: ✭ 25 (-21.87%)
Mutual labels:  quotes
vscode-database
Extension for Visual Studio Code
Stars: ✭ 132 (+312.5%)
Mutual labels:  vscode-extension
sapling
Sapling - A convenient way to traverse your React app in VS Code
Stars: ✭ 440 (+1275%)
Mutual labels:  vscode-extension
nova-inspire
The best way to connect with your customers is by reaching out and inspiring them. ~ Me
Stars: ✭ 14 (-56.25%)
Mutual labels:  quotes
vscode-cue
CUE language support for Visual Studio Code
Stars: ✭ 55 (+71.88%)
Mutual labels:  vscode-extension
angular-karma test-explorer
vscode extension for easy angular testing and debugging
Stars: ✭ 67 (+109.38%)
Mutual labels:  vscode-extension
super-encourager
vscode插件: 超级鼓励师 奖励下努力工作的你!
Stars: ✭ 42 (+31.25%)
Mutual labels:  vscode-extension

Bracketeer

‼️ IMPORTANT INFO

Unfortunately due to family reasons, I don't have time to maintain the extension and react to all the feedback in some reasonable time. The extension is stable and working, but there are bugs and edge cases I would like to address. If you want to help me with it, feel free to contact me. I don't plan to scratch the extension as I use it a lot myself. But I don't have the resources to move it forward and fix the bugs.

Thanks for understanding


Bracketeer gives you brackets and quotes superpowers at the tip of your fingers. Easily swap bracket/quote types, remove them or select their content from within with one command. No need to select content of the bracket/quote or move your cursor. Works even on multiple selections.

Extension should work with different languages, but if you encounter error, please let know and I will try to fix it.

Feedback and PRs are welcome. Enjoy the plugin.

Features

Bracketeer currently provide four commands to manipulate with brackets and their equivalents for quotes. All commands work on multiple selections as well.

Brackets

Swap brackets/Replace brackets with...

Swap brackets: Shift+Cmd+Alt+K Replace brackets with...: Shift+Cmd+Alt+U

This command allows you to switch to different bracket types from within the brackets without need to select them. You can either cycle through them or use Quick pick menu to select correct bracket immediately.

Swap brackets Swap brackets with multiple cursors

Remove brackets

Keyboard shortcut: Shift+Cmd+Alt+I

This command will delete closest brackets

Delete brackets

Select brackets content

Keyboard shortcut: Shift+Cmd+Alt+H

With the help of this command you can easily select content of the brackets, Calling this command again will select brackets as well. This can be chained to select outer brackets (and perform some actions on them).

Select brackets content

Quotes

Swap quotes/Replace quotes with...

Swap quotes: Shift+Cmd+Alt+; Replace quotes with...: not assigned by default

This command allows you to switch to different quote types from within the quotes without need to select them. You can either cycle through them or use Quick pick menu to select correct quote type immediately.

Swap quotes Change quotes to specific type

Remove quotes

Keyboard shortcut: Shift+Cmd+Alt+'

This command will delete enclosing quotes

Delete quotes

Select quotes content

Keyboard shortcut: Shift+Cmd+Alt+0

With the help of this command you can easily select content of the quotes, Calling this command again will select quotes as well. Unlike bracket alternative, selection won't expand more after selection of the quotes.

Select quotes content

How does it work

Since VS Code does not provide extension API for working with language (grammar) tokens. In order to make this extension I'm using Prism.js to parse the documents. This has some edge cases but mostly work pretty well. This extension have language-definitions.json file which contains brackets/quotes sets for given language and token types used to identify brackets/quotes in text (by Prism). For more detail have a look into source code. This file contains only small set of languages I'm using. If there is not language definition for your language of choice extension will default to JS (it works... usually).

If your language of choice is missing in definitions file and you would like to contribute please feel free to submit a PR. But test first that it is working, I will test it myself as well before merging.

Known Issues

  • HTML tokens parsed by Prism have nested tokens inside of them. Bracketeer can't handle it at the moment. So do not expect it to work here.
  • In case of switching quotes from multiline template literal to simple string the result will be invalid string (especially with variable interpolation). So the next quotes switching won't work and Bracketeer will fail. There is not an easy way how to fix it. So please keep that in mind.
  • When parsing quotes there may be some edge cases in string heavy documents with long multiline string when wrong quotes will be parsed. I plan to look into it and find a way how to minimize or remove this issue.

Road map

In no particular order:

  • Selection from cursor to opening/closing bracket/quote
  • Tests - yeah, don't have one yet (shame). And current refactoring was a hell sometimes. Seriously people write tests.
  • Cursor navigation to opening/closing brackets/quotes
  • Migrate to TS (once we have test)
  • Support for HTML (not working now)
  • Make it work in comments as well (I have some idea, just need to experimetn a bit)
  • Add settings to specify how large line offset should be used for quotes parsing (default is 8)

Release Notes

See changelog

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].