Vim: how to change / select a function name

Given:

function(param);

With the cursor anywhere in the function, I can use the ciw function to replace it, or viw to select the function name.

How can I do the same in the following cases:

object.function(param);
object.function<blah>(param);

Please note that ciW or viW do not work. Does this require redefinition of how vim respects its "words"?

+3
source share
1 answer

You're on the right track, you need to set up the way vim separates words.

To do this, add .as a word separator:

:set iskeyword+=\.
+5
source

All Articles