A text object in Vim is another way to specify a chunk of text to operate on. They can be used with operators or in visual mode, instead of motions.
Let's say you have this line of code:
printf("Hello, world!\n");
Now say you want to change the text to "Program exiting."
Command | Buffer | Mnemonic |
---|---|---|
ci" | printf("¦"); | change in the ". |
Program exiting.\n<esc> | printf("Program exiting.\n"); |