nsbm nsbm - 1 year ago 511
HTML Question

How to fold/unfold HTML tags with Vim

Is there some plugin to fold HTML tags in Vim?

Or there is another way to setup a shortcut to fold or unfold html tags?

I would like to fold/unfold html tags just like I do with indentation folding.

Answer Source

I have found zfat (or, equally, zfit) works well for folding with HTML documents. za will toggle (open or close) an existing fold. zR opens all the folds in the current document, zM effectively re-enables all existing folds marked in the document.

If you find yourself using folds extensively, you could make some handy keybindings for yourself in your .vimrc.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download