Pustelto / Bracketeer

VS Code extension for easy and quick manipulation with brackets and quotes.
https://marketplace.visualstudio.com/items?itemName=pustelto.bracketeer
MIT License
34 stars 9 forks source link

(Option to) delete highlighted brackets rather than "closest" #49

Open leoauri opened 3 years ago

leoauri commented 3 years ago

Hi there, thanks for this extension! I would find it convenient if the shortcut deleted highlighted brackets rather than directly enclosing, so that I have direct visual feedback about what is to be removed with the next keystroke

Pustelto commented 3 years ago

Hi, what do you mean exactly by highlighted brackets? You mean brackets in selection?

leoauri commented 3 years ago

Hi @Pustelto, sorry, I assumed this is the default behaviour.
When my cursor is sitting in front of a bracket, both this and the matching closing bracket are surrounded with a box, this is what I mean by highlighted. My suggestion is to make it possible to remove these visually highlighted brackets as default.

brack

In my setup vscode "highlights" the bracket directly after the cursor position (+ matching) if there is one, otherwise the next set of surrounding brackets. For me it would be useful to have this visual feedback correspond to the brackets to be removed by Bracketeer

Pustelto commented 3 years ago

I see, honestly I prefer to know that closest brackets will be modified, seems more predictive and logical to me. But that may be only my personal opinion. As for the request itself - if I would implement this it would be an optional settings (current mode and your suggestion) to avoid changing this for everyone. Second I need to check if I can get the position of the highlighted brackets (not sure if this is native VS Code or some extension) to get some idea how to tackle this.

Unfortunately I'm afraid I won't be able to do this very soon. I have very small amount of free time at the moment for personal projects and my current focus is elsewhere at the moment. Of course, if you would like to have a look feel free. but be warned I have put bracketeer together in a short time and it's not contributor friendly (something I would like to fix in the future as well).

goi42 commented 2 years ago

I would consider this a bug, even if it's not one technically. In the editor, I see one set of brackets highlighted, but that's not the set Bracketeer modifies. This routinely causes me to do a double-take while coding.