Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
leoauri opened this issue Nov 20, 2020 · 4 comments · Fixed by microsoft/vscode#160270
Open

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

leoauri opened this issue Nov 20, 2020 · 4 comments · Fixed by microsoft/vscode#160270

Comments

@leoauri
Copy link

leoauri commented Nov 20, 2020

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
Copy link
Owner

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

@leoauri
Copy link
Author

leoauri commented Nov 20, 2020

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
Copy link
Owner

Pustelto commented Dec 1, 2020

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
Copy link

goi42 commented Apr 15, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants