Underscore being ignored in `editor.wordSeparators`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
Underscores, "_", cannot be used as word separators for vim commands, even though they work with VSCode commands.
To Reproduce
Steps to reproduce the behavior:
- Go to settings and change
Editor: Word Separatorsfrom default:
`~!@#$%^&*()-=+[{]}\|;:'",.<>/?
to
`~!@#$%^&*()-=+[{]}\|;:'",.<>/?_
(underscore added at end)
- Open a text editor pane and add the text:
word1_word2 - In edit mode, place the cursor on the first "w" of the string added in step prior and issue the vim "delete word" command with keystrokes d w
- Observe the entire string is deleted.
- In edit mode, issue the undo command, u to restore the string from step 2.
- Again with the cursor on the first "w" of the string created in step 2, open the VSCode command palette and issue the command
Delete Word(@command:deleteInsideWord). - Observe that only the text
word1is deleted, leaving the remainder of the test string as_word2.
Expected behavior
Underscores should be able to be defined as word boundaries.
Screenshots
NA
Environment (please complete the following information):
- Extension Name:
vim - Extension Version:
1.18.5 - OS Version:
Windows_NT x64 10.0.18363 - VSCode version:
1.52.1
Additional context
NA
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Vim delete-word command dw and how it uses the VS Code editor.wordSeparators setting; compare its behavior with @command:deleteInsideWord using the reproduction steps. Done means adding _ as a configured separator makes dw delete only word1, leaving _word2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100