Vim provides a builtin textobject t
that captures a matched pair of HTML tags — so e.g. if you start with this <i>that█ <b>those</b></i>
, then typing dat
in normal mode leaves you with this█
. Very cool.
How might I create similar textobjects for other markup languages with this sort of begin/end syntax? For instance, if I wanted one that captures the a matched pair of Liquid tags, or a matched LaTeX \begin{foo}
and \end{foo}
tag pair, where might I start?
I'm willing to do some digging and to write my own code, but seeing an example where someone has accomplished something similar would be very helpful.
foo
tag, please look for a/foo
in particular." I think that prevents it from handling this. If there's a plugin with that feature, I haven't seen it recommended, though I'll certainly keep googling.