views:

176

answers:

1

In Notepad++ when you work with HTML, when you move the cursor onto a tag it automatically highlights that tag and its opening/closing corresponding tag. That is really useful when you have lots of div inside each other.

How do you turn this on in gVim?

+1  A: 

Not sure, but I don't think there's built in functionality or even a plugin to do that in Vim. There is a 'matchit.vim' plugin that extends the function of the bracket matching key ("%") so that it matches more than just brackets, can do tags in html files. That way when you press '%' on a tag in normal mode the cursor will jump to the matching open or close tag.

matchit.vim is included with Vim distributions in the 'macros' subdirectory. You can get more info by reading install instructions for it there, or here's link to the script's page at vim.org: http://www.vim.org/scripts/script.php?script_id=39

Herbert Sitz