An open API service indexing awesome lists of open source software.

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

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.

![](./images/magical-bracket.gif)

- **πŸ’₯ 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 )

![](./images/split-lines.gif)

- **πŸ”₯ Complete Brackets πŸ”₯**

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

![](./images/complete-bracket.gif)

## 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.