Vim movements: transition to parent

In Vim, how can I navigate to parent / cousine tags in xml files? I am looking for something similar to:

vatat " create a selection for second parent tag with all child elements 

but in normal mode (for example: go to the second parent tag).

+7
source share
1 answer

You need a way to “move” using any movement of the text object or just the specific example you specified. For the first, just use v at the end

 vatatv 

(you can also use o in visual mode to go to the beginning / end of the selection)

If you want the mapping to just execute (use] t and [t)

  nnoremap ]t vatatv nnoremap [t vatatov 

or something similar

+11
source

All Articles