MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat

Fri, May 16, 2008 4:19 pm

Displaying Line Numbers in Vi

To turn on the display of line numbers in the vi editor, use the following command:

:set number

To turn off the dispaly of line numbers, use the command below:

:set nonumber

[/software/editors/vi] permanent link

Fri, May 16, 2008 3:20 pm

Delete Lines Containing or Not Containing a String Using Vi

To delete all lines containing a string or all lines not containing a particular string, you can use the global search options in the Vi editor.

Global Search

command affects lines containing string
command affects lines not containing string

To delete all lines containing "foo" you could use the following command:


To delete all lines not containing "foo" you could use the following command:



  1. vi Reference Card

[/software/editors/vi] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo