vim-surround emulation doesn't include "jump to nearest matching pair when outside" behaviour
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Is your feature request related to a problem? Please describe.
At the moment, VSCodeVim supports a lot of the vim-surround behaviour, such as ci) to delete the text between some parentheses and enter insert-mode to replace that text.
However, one subtle behaviour of vim-surround is how it handles invocations when you're not inside the requested marker. Currently, VSCodeVim simply … does nothing, if I do ci) outside of any parens; but very usefully, the original plugin jumps into the nearest matching pair on the line:
Describe the solution you'd like
I'd like the various vim-surround-emulation-motions to operate on the nearest pair, if they're not not inside one!
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
No files or tests are named. Start by locating the existing vim-surround emulation motions and reproduce the reported ci) case outside parentheses, then trace how matching pairs are selected. Done means the various emulation motions use the nearest matching pair on the line when the cursor is outside one, while preserving existing behavior inside a pair.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100
