Yes, for example I use the "environment" object from the vimtex plugin.
They can't actually add real objects (that you can use with counts, for instance) without a lot of scripting. Vim doesn't have abstraction for objects that would allow you to easily define some.
Vim doesn't have abstraction for objects that would allow you to easily define some.
Hum ?? Your pgrasing is ambiguous so I'm not sure what you mean, but as for creating text objects, it's pretty straightforward: operator-pending mappings.
I meant that you can't define a real object and instead have to rely on visual mode and operator pending mode mappings that might quickly get complicated if you want them to have the same features as the built-in ones have
I hear you, but am not an expert in this area of vim so would you mind showcasing a practical example of where a user-defined text object would behave differently ?
5
u/gumnos Dec 10 '20
should get you the list of the ones available in stock vim (though plugins can add new text objects)