Skip to content

Word Separator configuration for "$" ignored #3456

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

Closed
4 tasks done
FriedrichWeinmann opened this issue Jul 13, 2021 · 4 comments
Closed
4 tasks done

Word Separator configuration for "$" ignored #3456

FriedrichWeinmann opened this issue Jul 13, 2021 · 4 comments
Labels
Issue-Bug A bug to squash. Resolution-Answered Will close automatically.

Comments

@FriedrichWeinmann
Copy link

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

After modifying the VSCode settings for Editor: Word Separators, removing both - and $ from the default list will have VSCode ignore some of that setting for the PowerShell extension only :

In PowerShell script file

  • Removing the - is honored - doubleclicking on a cmdlet selects the full name
  • Removing the $ is ignored - doubleclicking on a variable does not select the $ of the variable

In a Markdown file

  • Removing the - is honored - doubleclicking on a cmdlet selects the full name
  • Removing the $ is honored - doubleclicking on a variable selects the full name

Configuration value

The full current value of the Editor: Word Separators setting is:

`~!@#%^&*()=+[{]}\|;:'",.<>/?

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.1.0-preview.6
PSEdition                      Core
GitCommitId                    7.1.0-preview.6
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.58.0
2d23c42a936db1c7b3b06f918cde29561cc47cd6
x64

Extension Version

Steps to Reproduce

Set Word Separators to:

`~!@#%^&*()=+[{]}\|;:'",.<>/?

Then doubleclick on a variable in a PowerShell script

Visuals

No response

Logs

No response

@FriedrichWeinmann FriedrichWeinmann added the Issue-Bug A bug to squash. label Jul 13, 2021
@ghost ghost added the Needs: Triage Maintainer attention needed! label Jul 13, 2021
@andyleejordan
Copy link
Member

You'll need to set those options for PowerShell files as well, as we supply a default value for PowerShell files. So just add this to your settings.json:

"[powershell]": {
    "editor.wordSeparators": "<copy/paste from your general editor.wordSeparators>"
}

@andyleejordan
Copy link
Member

Also, you may want to inspect why you have three separate extensions installed 🧐

@andyleejordan andyleejordan added Resolution-Answered Will close automatically. and removed Needs: Triage Maintainer attention needed! labels Jul 13, 2021
@FriedrichWeinmann
Copy link
Author

Heya Andy,
thanks for the swift and precise information on how to resolve this!
Worked just fine :)

Any way to get this setting exposed to the config UI though? As it is there is zero discoverability to find this on your own.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jul 14, 2021
@andyleejordan
Copy link
Member

I'd love to do it through the UI, I just need to learn more about the VS Code extension API to do it right. I'd say that's totally up for grabs if you wanted to make it happen!

@andyleejordan andyleejordan removed the Needs: Maintainer Attention Maintainer attention needed! label Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash. Resolution-Answered Will close automatically.
Projects
None yet
Development

No branches or pull requests

2 participants