Make CSS (kebab-case) identifiers "words" in vim mode #51482
thomasheartman
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What are you proposing?
Allow vim's "word" text object (w by default) treat identifiers in CSS (e.g.
background-color) as one word. This makes it the same as how it treats camelCased words in other programming languages as a single word.Why does this matter?
From my understanding (and experience in other languages in Zed), Zed typically treats language identifiers as a single word. This makes it quick and easy to, using vim mode, select, change, or delete entire identifiers.
However, in CSS (and possibly other languages that use kebab-case, such as lisps), there is no reliable way to select an identifier.
Are there any examples or context?
This would make it possible to, in one action, select the identifier "background-color" from anywhere inside the object in the following example:
{ background-color: red, }Without being able to target the identifier directly, the most reliable way now is to go to the start of the word and move until the
:. Using the defaultWtext object would also include the:, which isn't what you want.More context
Originally mentioned in #23519, although the issue was later modified to talk about
iskeywordsupport. I'm not sure exactly what that'd entail, and I also don't know if that'd solve my problem. The original text (and this discussion) is not concerned with the implementation, just that the behavior matches that of other languages.Beta Was this translation helpful? Give feedback.
All reactions