Can Vim highlight matching HTML tags like Notepad++?

前端 未结 3 1095
面向向阳花
面向向阳花 2020-12-22 15:15

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 m

3条回答
  •  攒了一身酷
    2020-12-22 15:36

    Greg's MatchTag.vim plugin is awesome, but I wanted something more. I wanted the enclosing tags to always be highlighted, not just when the cursor is on one of the tags.

    So I wrote MatchTagAlways which does everything that Greg's MatchTag does and also always highlights the enclosing tag, no matter where the cursor is in the code. It also works with unclosed tags and HTML templating languages like Jinja or Handlebars.

    Here's a GIF showing it in action:

    MTA in action

提交回复
热议问题