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 |