Motions and Text Objects

Other topics

Remarks:

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.

Changing the contents of a string or parameter list

Let's say you have this line of code:

printf("Hello, world!\n");

Now say you want to change the text to "Program exiting."

CommandBufferMnemonic
ci"printf("¦");change in the ".
Program exiting.\n<esc>printf("Program exiting.\n");

Contributors

Topic Id: 4107

Example Ids: 14302

This site is not affiliated with any of the contributors.