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

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

1 Answer 1

5

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.

2
  • Thanks! what did you mean by &c.? Dec 24, 2018 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, 2018 at 14:57

Your Answer

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

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