• Get the Flash Player to see the slideshow.
  • Categories

  • Authors

  • Great Quotes

    It always seems impossible until its done. — Nelson Mandela

Get in touch...

To have a chat about
your CMS needs...

Call us 0207 193 2014
or
Email us on

Remove Single Line HTML Comments using VIM

August 8th, 2008 by Richard Aldridge

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

 

Leave a Reply

You must be logged in to post a comment.