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/<!-- [...]

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

VIM Functions and Menu Items for Writing XSL

Add the following lines to a myxsl.vim file and place it in your VIM plugins directory. The next time you start VIM, you will have a menu called "lf" appear with the following items listed that allow you to create more xsl code with less typing. Note that you must also add the VIM utility functions [...]

By |2008-07-31T12:07:19+01:00July 31st, 2008|Vim, XSL|0 Comments

VIM Toolkit Functions

General-purpose functions for building up more useful VIM scripts. " Move the cursor up a line func Up() exe "normal k" endf " Move the cursor down a line func Down() exe "normal j" endf " Cut the selected buffer text to the windows clipboard func! Cut() exe "normal "+x" endf " Copy the selected [...]

By |2008-07-24T09:27:41+01:00July 24th, 2008|Vim|0 Comments