In vim, how can I make ci( change whatever is in brackets on the current line like ci" changes everything that is in quotes?
I tried
:nnoremap ci( f(lct)
but my mapping is ignored. Can I not extend the builtin commands like that?
Also is there any way to combine movements? Can I do something like c{f)hh} to change everything up to the two characters before the closing bracket?
Thanks in advance.
The behaviors of ci(
and ci"
are diferent because vim doesn't consider that quotes (and single quotes) come necessarily in pairs while ({[<
do. This is a bit weird at first.
There are a number of "fixes" to this "issue". This one is the first that comes to mind.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With