[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [VI] Søg og erstat i vi (RedHat 8.0)



Quoting Kim Schulz <sslug@sslug>:

> On Wed, 18 Dec 2002, Simon [iso-8859-1] Damkjær Petersen wrote:
> 
> > Jeg har luret lidt på listen og har et simpelt spørgsmål.
> >
> > Hvordan laver jeg søg og erstat med feks. æøå  til "&#TAL;"
> >
> > Jeg ved det ikke er højt niveau men det er hvor jeg er nået til
> >
> > På forhånd tak - Simon
> 
> 
> jeg plejer at bruge noget ala:
> 
> :%s/ord/nytord/g
> 
> Det virker og retter det i hele filen.
> hvis du kun oensker at det skal vaere den naeste forekomment, saa skal du
> fjerne g fra enden
> 
> VH
> Kim
> 

Det er ikke helt korrekt.

%s betyder, at du kigger på hele filen.
Det efterfølgende "g" fortæller, at man vil
foretage alle substitutioner i en linie mens
man uden "g" blot substituerer det første match
i hver linie.

M.v.h.

Kasper.


-- 
Kasper Hald, Ph.D.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 18:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *