Multi Cursor visual select find/replace only replaces on initial cursor
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
When you have multiple cursors and select text with each cursor in visual mode, the :'<,'>s/<old>/<new>/g command only replaces <old> with <new> in the text selected by the initial cursor.
To Reproduce
Steps to reproduce the behavior:
- Open a new document
- Add the following text
aaaa
bbbaaaabb
xxxaaaabb
- Select
aaaa - Use
gbor ctr | cmd + shift + L to instantiate other cursors selecting otheraaaainstances :'<,'>s/a/n/g- Observe only one instance of
aaaais replaced bynnnn
Expected behavior
All instances of aaaa would be replaced by nnnn
- Extension (VsCodeVim) version: 1.32.4
- VSCode version: 1.108.2
- OS: macos 15.7.3
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
Reproduce the issue in VSCodeVim 1.32.4 using the sample document, multiple cursors, and the :'<,'>s/a/n/g command. Start by tracing the visual-mode substitution handling and how it receives cursor or selection ranges. Done means the substitution changes every selected aaaa instance to nnnn, rather than only the initial selection.
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
- 45/100