Hi,

jas01 wrote:
> I have a huge file where I need to delete all lines except for a few I need.
> I'm trying to do this in a single command.
> 
> I know that:
> 
> :v/Text/d 
> 
> will delete all lines except for ones containing 'Text.' I have no idea how
> to put multiple strings so the command deletes everything except for 'Text'
> and 'Text2' and 'Text3'.

use  \|  in the search pattern

  :v/Text\|Text2\|Text3/d

See

  :help /\|

for more information.

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

Reply via email to