How to change string in vim?

Usage vimI can change the word that my cursor is turned on by anchoring cw. I can change the current character with cl. I can change everything in some brackets with ci{.

I can change the current and next line with cj. But how to change only the line the cursor is in?

I'm looking for something shorter and more effective than one of these commands: ddko, 0C, 0Daetc.

+5
source share
3 answers

The easiest way to do this is: Sor SHIFT-s, since it changes the entire line regardless of the location of the cursor.

cc , , , , .

+2

, cc. , , c$, C

+13

It seems that either ^C(or cc) (the beginning of the line, not counting the spaces), or 0C(the very beginning of the line) will work best. Shift-c (capital c) means changing everything from the cursor to the end of the line.

+2
source

All Articles