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

[Feature Request] Add option to deselect text after surrounding with parens/braces/etc #511

Closed
lacarmen opened this issue Dec 9, 2019 · 3 comments

Comments

@lacarmen
Copy link

lacarmen commented Dec 9, 2019

VSCode will wrap an expression if you select it and type your wrapper. However, it maintains the selection after wrapping. So if I were to select the text foo and enter ( then it would look like this (using square brackets to denote selected text): [foo] -> ([foo])

I'd like this option added so I can select something, wrap it, and keep typing without having to hit left afterwards. I use this workflow a lot to wrap forms with additional functions. (I know there's "proper" paredit commands to do this, but this is what I'm used to doing 😅)

So using the pipe to show where my cursor would be, this is how I'd like the behaviour to look: [foo] -> (|foo)

PEZ added a commit that referenced this issue Dec 13, 2019
@PEZ
Copy link
Collaborator

PEZ commented Dec 14, 2019

I am not a big fan of sprinkling out options, so I opted for changing the behaviour to the one you want. VS Code already implements the old behaviour anyway, so users will still have the option.

@lacarmen Can you try this VSIX for me and see that it behaves like you want it to? https://3366-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.72-fix-delete-unbalanced-501-d089928b.vsix

@lacarmen
Copy link
Author

@PEZ This is perfect, thank you!

@PEZ
Copy link
Collaborator

PEZ commented Dec 14, 2019

Great. Thanks for testing that so quickly.

@PEZ PEZ closed this as completed in d4b19f9 Dec 15, 2019
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

No branches or pull requests

2 participants