-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Surround text with angle brackets, expand select to angle brackets boundaries #57162
Comments
Additionally, is there any reason that "always" isn't an option here, or, at least, a default fallback for languages that which aren't defining or supporting it? It's quite jarring to lose bracket/quote surround when moving from one file to another. |
Disagree. Selected text should always be overwritten by characters from the keyboard. Otherwise it'll be inconsistent. I actually raised a bug report about this and the If this is implemented, it has to be an option that can be switched on or off. |
Workaround for wrapping: {
"key": "shift+.",// should be `>` key
"command": "editor.action.insertSnippet",
"args": {
"snippet": "<${1:${TM_SELECTED_TEXT}}>"
},
"when": "editorHasSelection"
},
{
"key": "shift+,",// should be `<` key
"command": "editor.action.insertSnippet",
"args": {
"snippet": "<${1:${TM_SELECTED_TEXT}}>"
},
"when": "editorHasSelection"
}, Expand selection was always kind of trashy in vscode #4795 |
Surrounding with angle brackets works with c++ and java, but not with typescript |
@usernamehw wow, thanks, that just works as expected |
Let's track the first part of the issue, where The second part of the issue has been fixed in the meantime and the |
So we've got this nice surround text with special characters feature that includes
(), [], '', ""
and surrounds the selected text with corresponding characters just by pressing(
,[
,'
,"
key.But there's no option to surround text with angle brackets that are used in Typescript generics for example. I've searched opened and closed issues, that's the only one related so far but no longer relevant. There's a nice extension that does that, but that's still requires a hotkey combination and not implemented on the editor level. That could be a really nice feature to wrap the selected text with a single
<
key press in the same fashion since Typescript is so tightly integrated into vscode. That could be an opt-in feature if it messes with some other user stories I'm not aware of. Or it wasn't implemented by some other decision?And there's another feature as
Expand select
that selects within boundaries (same characters again(), [], '', ""
) but doesn't respect angle brackets boundaries. That would be lovely to select text within angle brackets too.Using
Expand select
here, selects within parentheses and braces, ignores angle bracketsThe text was updated successfully, but these errors were encountered: