Gentoo Archives: gentoo-user

From: Ben <ben@××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT: need text viewer with delete and multiple files
Date: Tue, 13 Dec 2005 19:29:52
Message-Id: 200512131915.49203.ben@thatproject.co.uk
In Reply to: [gentoo-user] OT: need text viewer with delete and multiple files by Daevid Vincent
1 On Tuesday 13 December 2005 01:52, Daevid Vincent wrote:
2
3 > Is there any recommended text viewer/editor whereby I can easily step
4 > through the files (previous/next file), read .gz files, jump to the end of
5 > a file, and most importantly, delete the current file?
6
7 vim. There's probably other (better) ways, but:
8
9 :!rm $filename
10 :n!
11
12 The first line tells vim to execute the shell command rm, you have to give it
13 the filename, but that's displayed in the buffer anyway (or you can get it
14 with ^G). The second line tells vim to move to the next file, but to ignore
15 the fact that you have a buffer opened that hasn't been written yet. :p goes
16 to the previous file, if you haven't deleted it.
17
18 Actually thinking about it, you can do the same thing with less - !rm
19 $filename works too.
20 --
21 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] OT: need text viewer with delete and multiple files Manuel McLure <manuel@××××××.org>