Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I include periods when selecting a word in vim?

Tags:

vim

Let's say I'm calling a method on an object in my code like

if abc.xyz then foo

My cursor is on the 'c' in 'abc' and I want to change abc.xyz to something else. If I type ciw I'll be replacing only 'abc'. What can I use instead of iw so that it selects the entire 'abc.xyz'?

like image 512
Chris Doyle Avatar asked Dec 09 '22 11:12

Chris Doyle


1 Answers

Use W to separate words only with whitespace characters, it will select the whole string:

ciW
like image 85
Birei Avatar answered Dec 26 '22 13:12

Birei