use Vim's text-object API #2

merged 1 commit into from Apr 1, 2013


None yet

2 participants



Please define v using Vim's text-object API (see :help text-objects) so that viv and other motion commands work properly.

Hint: you can define your own text-objects using this Vim plugin.

Thanks for your consideration.

@robmiller Also create visual mode mappings
Previously, I had just bound operator-pending mappings (with onoremap);
this change allows you to use, for example, `viv` to select the inner
variable in visual mode.

The current mappings are actually text objects; the reason that e.g. viv doesn't work is because I had only done operator-pending mode mappings, and hadn't done visual mode mappings.

I'll push a change in a second that will allow you to use viv and vav.

@robmiller robmiller merged commit 6331b9f into master Apr 1, 2013
@robmiller robmiller deleted the visual-mappings branch Apr 1, 2013

This should do what you want, Suraj.


Thanks! It works now. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment