Vim
Vim copied to clipboard
Explain how or add ability to remap "c :"
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.