https://github.com/lyonbot/fix-brackets
Effectively edit, move, complete brackets with keyboard
https://github.com/lyonbot/fix-brackets
Last synced: 5 months ago
JSON representation
Effectively edit, move, complete brackets with keyboard
- Host: GitHub
- URL: https://github.com/lyonbot/fix-brackets
- Owner: lyonbot
- Created: 2024-01-10T11:50:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T14:51:53.000Z (over 1 year ago)
- Last Synced: 2024-11-25T15:45:02.114Z (over 1 year ago)
- Size: 1.99 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# F Brackets

βοΈ Fight against Brackets. Fly brackets.
[πΎ Install on VSCode](https://marketplace.visualstudio.com/items?itemName=lyonbot.fix-brackets) - [π¬ Feedback](https://github.com/lyonbot/fix-brackets/issues)
## Features
- **π« Magical Brackets: move on the fly π«**
When a glowing box wraps a bracket, you can **quickly move** brackets with:
- `Cmd+β²` `Cmd+βΌ` move by line
- `Cmd+β` `Cmd+βΆ` by token
- `Cmd+Alt+β` `Cmd+Alt+βΆ` by character
Brackets are wrapped while typing, or use `Cmd+G` to toggle magical mode.

- **π₯ Split Lines / HTML Attrs π₯**
Put caret on the bracket (or HTML tag name), then toggle line breaks with `π‘code actions` ( shortcut: `Cmd+.` then press `B` to quickly find it )

- **π₯ Complete Brackets π₯**
- **at end of line**, use `Cmd+βΆ` to complete brackets
- works on new lines too

## Extension Settings
## Known Issues
- The bracket matching algorithm is not perfect, so it might not work in some cases (eg. some JSX and HTML case)
- The completing algorithm is based on **indent**, I hope you have a decent code formatting.
- The parser is language-irrelative, so it doesn't complete `,` or `;` for you.
## Release Notes
### 0.1.0
Initial release of fix-brackets
- **π« Magical Closing Brackets π«**
- auto enter that mode when typing `]` `)` `}` - can be disabled in settings
- move them with `Cmd+Arrow`
- use `Cmd+G` to toggle that mode on any closing bracket
- **π₯ Complete Brackets π₯**
- **at end of line**, use `Cmd+βΆ` to complete brackets
- different behavior on empty / non-empty lines
### 0.2.2
Improve algorithm about bracket matching
- Support grouping ``
- Support fuzzing match for malformed bracket pairs
- Improve behaviors on line breaks.
### 0.2.3
Extended scan range, including brackets in comments and string literals
- Move brackets in string and comment
- Complete block comments' `*/` with `Cmd+βΆ`
- Complete brackets in string
- Use `Alt+β` and `Alt+βΆ` to move by one character. (in case things goes weird)
### 0.2.5
Improve default settings
- Use `Cmd+Alt+β` and `Cmd+Alt+βΆ` to move by character, cause I find `Alt+βΆ` is more meaningful for moving caret.
### 0.2.6
Feature: split lines π put caret on a bracket or its nearby spaces, then use `Cmd+.` to split / join lines of its content.
### 0.2.7
Feature: split HTML attributes π put caret on a HTML tag name, then use `Cmd+.` to split / join attributes to lines.