Note that there are some explanatory texts on larger screens.

plurals
  1. POCan vim highlight matching HTML tags like Notepad++?
    text
    copied!<p>VIM has support for matching pairs of curly brackets, parentheses, and square brackets. This is great for editing C-style languages like PHP and Javascript. But what about matching HTML tags?</p> <p>Notepad++ has had this feature for as long as I've been using it. Being able to spot where blocks of HTML begin and end is very useful. What I'm looking for is something like this for vim (see the green div tags):</p> <p><img src="https://i.stack.imgur.com/swLB4.png" alt=""></p> <p>(a bonus feature: highlighting unclosed HTML tags, like the red tag in this screenshot).</p> <p><a href="http://www.vim.org/scripts/script.php?script_id=39" rel="nofollow noreferrer">matchit</a> has been proposed as a next-best-thing, but it requires an extra keystroke to use its functionality. I'd like be able to see where the blocks of HTML begin and end without an extra keypress.</p> <p>I've trawled the internet to find something like this for vim. Apparently, I'm not the only one, according to 2 other <a href="https://stackoverflow.com/questions/2154193/using-vim-as-a-html-editor">StackOverflow</a> <a href="https://stackoverflow.com/questions/1957083/vim-script-to-hightlight-end-of-a-tag-like-braces/1960175">questions</a> and <a href="http://vim.1045645.n5.nabble.com/How-can-Vim-highlight-the-matching-tag-when-I-put-the-cursor-on-the-other-one-in-a-pair-of-tags-td1177554.html" rel="nofollow noreferrer">nabble</a>.</p> <p>I've almost resigned myself to vim not being able to visually match html tags. Is it possible for vim to do this?</p> <p>Addendum: If it is not currently possible to do this with any existing plugins, does any vimscript wizard out there have any pointers on how to approach writing a suitable plugin?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload