I'd be perfectly happy in doing :w! and getting the file saved under a
random named (like the ones you proposed) under ~/.vim/rubbish/. If
someone then wants to make more advanced user interfaces for exploring
the rubbish folder, that is fine with me too, but I'd do fine without
one. I don't mind tidying the files in that folder up every once in a
while, as long as my work is not interrupted with irritating problems,
like thinking of file names.

On Tue, Jul 14, 2009 at 12:12 AM, Tony
Mechelynck<[email protected]> wrote:
>
> On 12/07/09 14:22, Toni Ruottu wrote:
>>
>>    hello
>>
>> I use vim for all kinds of different work. At times I'm using it to
>> edit source code or other files, where it is really clear what the
>> filenames are and where they are going. At some other times I use vim
>> for storing a few random notes, or to edit some text that is
>> eventually going to a web form or instant messenger message. With the
>> latter cases I'd really like to be able to save the file just by
>> saying :w without providing a filename.
>>
>> And this is something I naturally do. No one told me to do it, or said
>> it would be ok to do. Ok or not it really gets in the way of my
>> editing that I find myself hitting :w multiple times with always
>> getting the complaint about file name not being defined. Then I might
>> spend a few seconds thinking about a filename or directory for the
>> information, just to notice that I don't have a good plan for storing
>> such files in a file system hierarchy. Then I forget about it and
>> after a few seconds of more editing I, by instinct, hit :w again a few
>> times wondering why it doesn't work. Until I read the message and
>> spend some more time thinking about the filename.
>>
>> I'm suggesting that vim could generate filenames for the files which
>> do not already have them. Just store all such files somewhere under
>> ~/.vim/drafts/. I'd like to know, if others have the same problem. I
>> can't help myself thinking that fixing this is more important than
>> concentrating on many advanced features that vim already has.
>>
>>    cheers --Toni
>
> It would be easy to add some command in Vim to store nameless buffers
> under a random filename, but how would you find them back? If you come a
> week later and find the files cf7g9k5x.txt, vfg5h8qw.txt and
> ytdf56vq.txt, how would you remember what you'd used them for (other
> than by looking inside them, of course)?
>
> I'd say it's much better to save the files -- if you really need to save
> them -- under a descriptive name, and _only you_ can give that name, be
> it "AuntMary.txt" or "resume.html" or whatever. If it's a first draft
> for something that's going to be sent or published, save it under the
> name it's gonna get when finished; and if it's going to be used for a
> few days or weeks then scrapped, at least give it a name which tells you
> what there is in it.
>
> As for hitting :w again at a beep without reading the message, that's
> something you should never do. If there's a beep and a message, or even
> just a red message, then something went wrong, and the first thing you
> should do then is find out what went wrong and see what you should do
> about it. Maybe it's a page of notes which you don't need any longer,
> and then the "right" thing to do is to hit ":q!" or ":enew!" on that
> window to quit it without saving. If Vim saved every buffer that you
> forgot to close when you didn't need them anymore, imagine the clutter
> on your disk!
>
>
> Best regards,
> Tony.
> --
> Fats Loves Madelyn
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui