How do I highlight the block of text between two delimiters / tags / "surroundings"?
(e.g., between matching parentheses ()s, quotes "", html tags (div../div), etc.)
(Or maybe how to select the block, if that would have the same effect as highlighting it)

I have the vim-surround plugin installed, so that could be used for the solution, or just plain vim is fine too.


Type the following commands in normal mode / command mode:

(I just discovered that ☝️ answer ☝️ on stackoverflow)

:help v
:help v_it (inner tag block)
:help text-objects

  • I believe text-objects is the help topic you're looking for.
    – Pak
    Oct 7 '20 at 0:28
  • Thanks @Pak! I've now added it. Oct 7 '20 at 0:34

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.