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

Make Ctrl+D use editor.wordSeparators instead of language word definition #25380

Closed
wildeyes opened this issue Apr 26, 2017 · 5 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-contrib Editor collection of extras editor-multicursor Editor multiple cursor issues feature-request Request for new features or functionality
Milestone

Comments

@wildeyes
Copy link

  • VSCode Version: 1.12.0-insider
  • OS Version: Win10

Steps to Reproduce:

  1. Go to a css file.
  2. have a .foo { property-with-dash: value }.
  3. put cursor anywhere in "property".
  4. ctrl-d.
  5. Selection is from property to dash, including dashes.

What I expected: Selection would be only on the word I was on, dashes acting as delimiter, like space.

@alexdima
Copy link
Member

Ctrl+D honours the word definition provided by the language, in this case, CSS, which defines - as being a word character.

@wildeyes
Copy link
Author

So it's up to me to change the word definition of the language if I want it otherwise. Thanks.

@aeschli
Copy link
Contributor

aeschli commented Apr 26, 2017

Language word definitions can not be easily changed except by language extensions.
But changing it is not recommended as would break contributed code assists which use the word expression to decide what to complete and replace.

@alexandrudima My suggestion is still that ctrl-d uses the editor.wordSeparators and what's selected in Ctrl+D is consistent with what double clicking gives you. That's what I see in Sublime too.
Also it would be great if "editor.wordSeparators" could made a language scopable

	"[css]": {
		"editor.wordSeparators": ""
	}

@wildeyes
Copy link
Author

wildeyes commented Apr 26, 2017 via email

@aeschli aeschli changed the title CSS property and ctrl d Make Ctrl+D word expansion user configurable Apr 26, 2017
@aeschli aeschli assigned alexdima and unassigned aeschli Apr 26, 2017
@aeschli aeschli reopened this Apr 26, 2017
@alexdima alexdima added the feature-request Request for new features or functionality label Apr 27, 2017
@alexdima alexdima added this to the Backlog milestone Apr 27, 2017
@alexdima alexdima added the editor-contrib Editor collection of extras label Apr 27, 2017
@alexdima alexdima added the editor-multicursor Editor multiple cursor issues label Oct 23, 2017
@alexdima alexdima modified the milestones: Backlog, On Deck Oct 23, 2017
@alexdima alexdima changed the title Make Ctrl+D word expansion user configurable Make Ctrl+D use editor.wordSeparators instead of language word definition Oct 23, 2017
@alexdima
Copy link
Member

Let's track in #15774

@alexdima alexdima added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 23, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-contrib Editor collection of extras editor-multicursor Editor multiple cursor issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants