-
Notifications
You must be signed in to change notification settings - Fork 511
Holding Ctrl+Shift+Left/Right Arrow doesn't work in the variable selection #1358
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
Comments
Hi @Ali64B, would you be able to provide a small reproducible scenario? Like a code snippet we could try to reproduce this with? And if the behaviour is more visual, you should be able to upload a GIF here that demonstrates it. |
Variable in PowerShell must start with “$” and since “$” has been introduced as white space character there is no way to select the whole variable name with one time using CTRL+SHIFT+LEFT/RIGHT ARROW. |
Hey @Ali64B, can you elaborate on what you mean by
|
It looks like Line 56 in 9bf58a7
|
I'd be interested in knowing if this issue repros without the PowerShell extension installed. If it does repro, this could be an issue we need to bring up with VSCode itself on how we can fix this at their level. |
Hi @rjmholt. |
@Ali64B No I mean, that regex defines "words" in PowerShell, and already includes Is there another place where you're saying we're defining whitespace characters? Otherwise, it may be a change we need to make in the VSCode code, although I'm not sure where. So to be clear, I'm not sure what is causing this bug, but I think the line I linked above is already correct. |
@rjmholt This issue is not fixed yet Allow language extensions to override editor.wordSeparators |
Good find! That looks like it might be the part in question. That means users can override that setting then yes?? |
Yes , you're right. |
So I'm thinking we should come up with a good regex for PowerShell and post it here (so that anyone can use it). And then work out if there's a way for us to set that setting when the extension is running. I've also followed up on that issue you linked. |
@Ali64B you might want to take a look at this as a work around. |
|
Since we don't have this at the language level yet, I'm gonna go ahead and close this in favor of the VSCode issue. Let me know if you think otherwise! |
So I tried that |
Does this work better? "editor.wordSeparators": "`~!@#%^&*()-=+[}\\|;:'\",.<>/?" Also, I'm annoyed its a just a character list rather than a regex or something... I thought the "word" definition was supposed to deal with this. |
Oh whoops, I left one of the braces in. Also we could try taking the colon out too: "editor.wordSeparators": "`~!#%^&*()-=+[]\\|;'\",.<>/?" (Also took the |
That handles the |
System Details
Issue Description
I can't select a variable with CTRL+SHIFT+LEFT/RIGHT ARROW, it doesn't continue highlighting a $ character.
kind regard :-)
The text was updated successfully, but these errors were encountered: