Meino Christian Cramer wrote:
From: James Vega <[EMAIL PROTECTED]>
Subject: Re: vim prison ?
Date: Thu, 27 Apr 2006 23:08:51 -0400
On Fri, Apr 28, 2006 at 04:52:25AM +0200, Meino Christian Cramer wrote:
Now I recognize, that file1 does not need any changes and want vim to
simply "forget" that file. I have "set hidden" in my .vimrc since I
normally have to edit more than one file. And the files are long and
loading takes some time ( : ...[converting]... .).
I <C-^> to file1 and say
:q!
The :q-related commands are to *q*uit Vim. You want to delete the
buffer. That's done with :bd (in your case :bd! to abandon changes).
":help buffers" for more info on how to interact with buffers in Vim.
HTH,
James
--
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>
Hi James,
thank you for your super fast reply :O) !
I searched through the help files before. Ad a newbie to vim it
is not simple for me sometimes to find out for what to search...
And a simple "grep" ist not /that/ helpful....
Unfortunately
bd!
has a sideeffekt:
After
:e file1
and
:e file2
I edit file2 and (accidently) file1.
With <C-^> I go back to file1 and
bd!
. The window (or is it a buffer?) disappear.
Now I did some
<C-^>
and: TADA! Here it is again and perfectly loaded: file1
Ooops...I told vim to forget that file...
Any way arround this ?
Keep hacking!
mcc
I work the same way as you do, but I don't use C-^
I use :bn[ext ] or :bp[revious], mapped to C-n and C-p, respectively.
Then :bd! works flawlessly.
I'm not sure what the difference is though.
dado