🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3972

Re: A delete questions in vim

#3972
From: Sitaram Chamarty
Date: Mon, 17 Feb 1997 00:00
25 lines
1615 bytes
guckes@banach.math.fu-berlin.de (Sven Guckes) wrote:

>ibelooze@runet.edu (Ilya):
>> In vim [the command] dfA will delete to and including "A" character on a
>> line in the command mode. How do I do the same thing globally - to every
>> line in the file?
>
>The command deletes to the next 'A' - so it depends on the current position.
>As this is not defined I assume that position in column 0 is wanted.
>
>	:%s/^.*A//
>
>Well, this will delete to the last  'A' in every line.
>This one should delete to the first 'A' of every line:
>
>	:%s/^.*A[^A]*$//

Never forget "normal" - makes life very simple very often!
        :g/A/ normal dfA
However, the screen flashes a heck of a lot - as vim hits all the lines that
have an "a" but not "A" (my settings are always "ic").  If that's a bother
":set noic" first.

Sitaram
Technical Details
Message-ID: <3307bd63.106727733@news.diac.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <5e6c42$ou7@newslink.runet.edu> <slrn5gej4g.18l.guckes@banach.math.fu-berlin.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f8c9b,99ce9c1deb2ced06
X-Google-Attributes: gidf8c9b,public
X-Google-Thread: 103b8b,99ce9c1deb2ced06
X-Google-Attributes: gid103b8b,public
X-Google-Thread: 107393,99ce9c1deb2ced06
X-Google-Attributes: gid107393,public
X-Google-Thread: 102b9a,99ce9c1deb2ced06
X-Google-Attributes: gid102b9a,public
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: A delete questions in vim
Date: 1997/02/17
Message-ID: <3307bd63.106727733@news.diac.com>
X-Deja-AN: 219277028
Distribution: inet
References: <5e6c42$ou7@newslink.runet.edu> <slrn5gej4g.18l.guckes@banach.math.fu-berlin.de>
Organization: none
Reply-To: sitaram@diac.com
Newsgroups: comp.editors,comp.emacs,gnu.emacs.help,comp.unix.questions