//Remove Single Line HTML Comments using VIM

If you want to remove all HTML style comments (ones that span a single line), use the following VIM commands :

Check for all single line HTML comments in VIM :-

:g/<!– .{-}–>/p

Typing the above displays all lines that contain HTML style comments

To remove all the comments use the following VIM command :-

:%s/<!– .{-}–>//g


By |2008-08-08T10:26:24+01:00August 8th, 2008|Vim|0 Comments

About the Author: