Re: VIM
Charl Matthee wrote:
>
> On Tue Sep 18 2001 at 10:38:57AM +0200 'Craig' <craigsc@zdata.co.za> wrote:
>
> > Need to do an extended find and replace with VIM, anyone
> > know the syntax for me ? I have a really long named.conf
> > file I need to modify ...
>
> :%s/thing_to_find/thing_to_replace/gc
>
> g: global
> c: check with operator before substituting
>
> If you need to find and replace over multiple lines I suggest you rather
> use a little perl script.
maybe if you want to script, you can use the -s option of vim
cat < EOF > cmd.file
:1,$s/thing_to_find/thing_to_replace/
:wq
EOF
vim -s cmd.file named.conf
regards
hugh
>
> Ciao
>
> Charl
> __________________________________________________________________________
>
> Making reality real since 1974.
> __________________________________________________________________________
>
> [ Charl Matthee ] [ +27-11-721-3800 ]
> [ Reality Manufacturing ] [ +27-11-405-6508 ]
> __________________________________________________________________________
>
> --
> To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to:
- References:
- VIM
- From: "Craig" <craigsc@zdata.co.za>
- Re: VIM
- From: Charl Matthee <charl@infosat.net>