How to include periods when choosing a word in vim?

Let's say I call a method on an object in my code, like

if abc.xyz then foo

My cursor is on 'c' in 'abc' and I want to change abc.xyz to something else. If I type ciw, I will only replace "abc". What can I use instead iwso that it selects the entire "abc.xyz"?

+4
source share
2 answers

Use Wto separate words only with whitespace, it will select a whole line:

ciW
+9
source

Include .in options iskeyword:

set iskeyword=@,48-57,_,192-255,.
+5
source

All Articles