0

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

  • 2
    Isn't cit what you are looking for? it meaning inner tag block. :help it. – lsrdg Dec 25 '18 at 19:49
4

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.? – CIsForCookies Dec 24 '18 at 14:52
  • 1
    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 Dec 24 '18 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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