65
19
If I have this text in vim, and my cursor is at the first character:
www.foo.com
I know that I can do:
cw
to change up to the first period, because aword
(lowercase w) ends at any punctuation OR white spacecW
to change the whole address, because aWord
(uppercase w) ends only at whitespace
Now, what if I have this:
stupid_method_name
and want to change it to this?
awesome_method_name
Both cw
and cW
change the whole thing, but I just want to change the fragment before the underscore.
My fallback technique is c/_
, meaning 'change until you hit the next underscore in a search,' but for me, that also causes all underscores to be highlighted as search terms, which is slightly annoying.
Is there a specifier like w
or W
that doesn't include underscores?
What's wrong with
:nohl
? – Ignacio Vazquez-Abrams – 2011-02-10T14:27:26.277I do want search terms to be highlighted most of the time; just not when I use search as a movement. (I also just asked this question: http://superuser.com/questions/244042/is-it-possible-to-not-trigger-my-normal-search-highlighting-when-using-search-as)
– Nathan Long – 2011-02-10T14:36:14.413