Saturday, 15 June 2013

autocomplete - How can I configure vim so that movement commands will include underscores and CamelCase, but completion will ignore them? -



autocomplete - How can I configure vim so that movement commands will include underscores and CamelCase, but completion will ignore them? -

for example, have this:

set iskeyword-=_

this has effect of making work:

foo_bar

if cursor on "f", pressing w moves cursor underscore. pressing 1 time again moves "b" in bar. desired effect movement, has undesired side-effect of breaking completion. same story camelcase tokens. example,

if have this:

foo_bar

and type foo_<ctrl+n> don't "foo_bar" completion option.

install camelcase motion plugin , follow illustration on page override default w mapping camelcase one. create movements follow camelcase, won't require changes iskeyword. alternatively can utilize alternative comma-preceded mappings (my preference), ,w, ,e etc camelcase motions.

vim autocomplete camelcasing underscores

No comments:

Post a Comment