In Vim, how can I move to parent/cousine tags in xml files? I'm looking for something similar to:
vatat " create a selection for second parent tag with all child elements
but in normal mode (eg: go to second parent tag).
Do you want a way to "move" using any text-object motion or just the specific example you've given. For the first one, just use v at the end
vatatv
(you can also use o in visual mode, to go to the begining/end of the selection)
If you want a mapping just do (to use ]t and [t)
nnoremap ]t vatatv
nnoremap [t vatatov
or something similar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With