views:

204

answers:

1

For example, I currently have this:

set iskeyword-=_

This has the effect of making this work:

foo_bar

If cursor is on "f", pressing w moves cursor to the underscore. Pressing again moves to the "b" in bar. This is the desired effect for movement, but has the undesired side-effect of breaking completion. Same story with CamelCase tokens. For example,

If I have this:

foo_bar

and I type foo_<CTRL+N> I don't get "foo_bar" as a completion option.

TIA, Noah

+4  A: 

Install the camelcase motion plugin and follow the example on the page to override the default w mapping with the CamelCase one. This will make movements follow CamelCase, but won't require changes to iskeyword. Alternatively you can use the alternative comma-preceded mappings (my preference), ,w, ,e etc to do CamelCase motions.

Al
Awesome. Thanks. I kept the original wbe motions, though. +1 for also fixing CamelCase, which wasn't part of my original question :)
Noah