Remapping of `ys` as in the vim.surround plugin doesn't work.
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 trying to use the following setting to remap * to ys which is the trigger for vim.surround plugin, it doesn't work as expected:
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [
"*"
],
"after": [
"y",
"s"
]
},
]
To Reproduce
Use the aforementioned remapping. and type * in normal mode, then a and a quotation mark like aw" (i.e. type *aw" in normal mode).
Expected behavior
The word under the cursor be surrounded in ", which is the behaviour of typing ysaw" in normal mode.
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.27.3
- VSCode version: 1.89.1
- OS: Windows 11 23H2
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 reproducing the normal-mode remapping with the shown configuration and the *aw" sequence, then trace how keybindings are passed to the vim.surround behavior. Done means the remapped sequence surrounds the word in quotes just like ysaw", while preserving the existing direct behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100