Vim Useful Tricks
Hi everyone. Today I want to share a vim trick.
It’s very useful when I was coding every day.
So hope you like it.
Problem
I have those situation every day. I want to change ‘target’. So how can I do?
1 | foo target boo |
This article is very subjective. If you do not feel comfortable viewing it, please close it as soon as possible.
If you think my article can help you, you can subscribe to this site by using RSS.
ci anything
We can use ci
combining commands.
When your cursor on ‘target’ this word. We can use
ciw
1 | foo target boo |
ci"
1 | foo "target target" |
ci'
1 | foo 'target target' |
ci(
1 | foo (target target) |
ci{
1 | foo {target target} |
ci[
1 | foo [target target] |
ci<
1 | foo <target target> |
cit
1 | foo <div>target target</div> |
Referrals
Photo by Pankaj Patel on Unsplash
Vim Useful Tricks