Explain how or add ability to remap "c :"
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.
I'm trying to create a macro c: that works like ci" but instead of changing the "text in quotes" it changes the text between : and;.
.someClass {
margin-top: 1000rem;
// ^------^ this area
}
Describe the solution you'd like
I'm not sure the best way to do this.
Describe alternatives you've considered
I've tried using "vim.normalModeKeyBindings" and "vim.operatorPendingModeKeyBindings" but either I couldn't figure out the correct sequence in "before" to do it, so such a setting seems to have no effect
"vim.normalModeKeyBindings": [
{
"before": ["c", ":"],
"after": ["F", ":", "f", ":", "l", "c", "t", ";", " "]
}
]
I also tried setting a keybinding as noted in the readme
{
"key": "c shift+;",
"command": "vim.remap",
"when": "inputFocus && vim.mode == 'Normal'",
"args": {
"after": ["F", ":", "f", ":", "l", "c", "t", ";", " "]
}
}
Which works but completely breaks other sequences starting with c such as ciw.
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 with the README remap example and the vim.normalModeKeyBindings and vim.operatorPendingModeKeyBindings settings described in the issue. Determine how a c: mapping can coexist with sequences such as ciw, then verify that the requested change or explanation supports changing text between : and ; without breaking existing c mappings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100