use Vim's text-object API #2

Merged
merged 1 commit into from Apr 1, 2013

Projects

None yet

2 participants

@sunaku

Hello,

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.
1c3352b
@robmiller
Owner

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
@robmiller
Owner

This should do what you want, Suraj.

@sunaku

Thanks! It works now. 😅

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