What would be the best way to delete / change the inner block of an xml element? I could use df< when my cursor is inside the block, i.e. when I have:

<elem>foo bar<\elem>
cursor location

df< from here should do it, but is there an inner block trick for this?

noob here, so not sure what tags to use

  • 3
    Isn't cit what you are looking for? it meaning inner tag block. :help it.
    – lsrdg
    Commented Dec 25, 2018 at 19:49

1 Answer 1


Try the text-object it for in tag: dit, cit, &c. all do what you would expect.

There’s also at for a (whole) tag.

  • Thanks! what did you mean by &c.? Commented Dec 24, 2018 at 14:52
  • 2
    Just “et cetera”—if you know operators like delete, change, visually select, you can apply all of them to the text object. There are many operators, not including those from plugins like surround.vim or vim-commentary.
    – D. Ben Knoble
    Commented Dec 24, 2018 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.