The simplest workaround: use cio (see here), or use ciW to select a whitespace-delimited word.
The bigger issue has to do with the value of the _ character in the syntax table. The issue is that _ is, by default, a symbol constituent in the syntax table, and you want to treat it as a word constituent.
If you're using emacs 24.4, you could try enabling superword-mode. I haven't tried it myself, so your mileage may vary.
An alternative is simply to modify the syntax table yourself and tell Emacs you want it to treat the _ character as a word constituent, like so:
(modify-syntax-entry ?_ "w")
After you do that, ciw works as you want it to, such that it will select all of abc_def_ghi rather than just def.
Doing it this way, however, may be overkill, especially if you only want the _ to count as part of the word for the text object. Instead, you can advise evil-inner-word as follows:
(defadvice evil-inner-word (around underscore-as-word activate)
(let ((table (copy-syntax-table (syntax-table))))
(modify-syntax-entry ?_ "w" table)
(with-syntax-table table
ad-do-it)))
Now, _ is still a symbol constituent for everything except for the inner-word text object, so ciw will do precisely what you want without touching the functionality of anything else.
You can read more about modifying syntax tables on the EmacsWiki node.
w,aw, etc.), you can do the same with the following functions too:evil-forward-word-begin,evil-forward-word-end,evil-backward-word-begin,evil-backward-word-end,evil-a-word,evil-inner-word. Note: you need to changeunderscore-as-wordinto different, unique (arbitrary) values. – sitaktif Oct 18 '16 at 06:33(modify-syntax-entry ?_ "w")didn't work for me for some reason. Doing it interactively didn't work either. Any idea why or how I can debug this? I'm on Spacemacs in case that's relevant. – agentofuser Feb 17 '18 at 13:23(modify-syntax-entry ?_ "w" rust-mode-syntax-table), then it worked. – agentofuser Feb 17 '18 at 13:28superword-modedoesn't affect movement inevil-mode. So it's not a constituent to modifying syntax tables. – Hi-Angel Dec 24 '18 at 13:10