Quit other buffers

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Quit other buffers

Giorgos Gaganis
Hello

Does vim provides a way when multiple buffers exist to close all the
others than the current one. I have looked at :help quit but with no luck

Thanks
Giorgos
Reply | Threaded
Open this post in threaded view
|

Re: Quit other buffers

Marian Csontos
Hi,

only one word:
:only

Regards

-- Marian

On Thu, 25 Aug 2005 11:26:07 +0200, Giorgos Gaganis  
<[hidden email]> wrote:

> Hello
>
> Does vim provides a way when multiple buffers exist to close all the  
> others than the current one. I have looked at :help quit but with no luck
>
> Thanks
> Giorgos
>
>
> ________ Information from NOD32 ________
> This message was checked by NOD32 Antivirus System for Linux Mail Server.
> http://www.nod32.com
>
>
> __________ Informacia od NOD32 1.1191 (20050810) __________
>
> Tato sprava bola preverena antivirusovym systemom NOD32.
> http://www.eset.sk
>
>


________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com
Reply | Threaded
Open this post in threaded view
|

Re: Quit other buffers

Paul-433
Or "ctrl-w o".

On Thu, 25 Aug 2005, Marian Csontos wrote:

> Hi,
>
> only one word:
> :only
>
> Regards
>
> -- Marian
>
> On Thu, 25 Aug 2005 11:26:07 +0200, Giorgos Gaganis <[hidden email]>
> wrote:
>
>> Hello
>>
>> Does vim provides a way when multiple buffers exist to close all the others
>> than the current one. I have looked at :help quit but with no luck
>>
>> Thanks
>> Giorgos
>>
>>
>> ________ Information from NOD32 ________
>> This message was checked by NOD32 Antivirus System for Linux Mail Server.
>> http://www.nod32.com
>>
>>
>> __________ Informacia od NOD32 1.1191 (20050810) __________
>>
>> Tato sprava bola preverena antivirusovym systemom NOD32.
>> http://www.eset.sk
>>
>>
>
>
> ________ Information from NOD32 ________
> This message was checked by NOD32 Antivirus System for Linux Mail Server.
> http://www.nod32.com

--

.
Reply | Threaded
Open this post in threaded view
|

RE: Quit other buffers

vishnu-3
Is the question asked is to close other buffers or windows? The answers
provided here are to close other windows.

~VIshnu


-----Original Message-----
From: Vigil [mailto:[hidden email]]
Sent: Thursday, August 25, 2005 3:00 PM
To: Vim Mailing List
Subject: Re: Quit other buffers

Or "ctrl-w o".

On Thu, 25 Aug 2005, Marian Csontos wrote:

> Hi,
>
> only one word:
> :only
>
> Regards
>
> -- Marian
>
> On Thu, 25 Aug 2005 11:26:07 +0200, Giorgos Gaganis
<[hidden email]>
> wrote:
>
>> Hello
>>
>> Does vim provides a way when multiple buffers exist to close all the
others
>> than the current one. I have looked at :help quit but with no luck
>>
>> Thanks
>> Giorgos
>>
>>
>> ________ Information from NOD32 ________
>> This message was checked by NOD32 Antivirus System for Linux Mail
Server.

>> http://www.nod32.com
>>
>>
>> __________ Informacia od NOD32 1.1191 (20050810) __________
>>
>> Tato sprava bola preverena antivirusovym systemom NOD32.
>> http://www.eset.sk
>>
>>
>
>
> ________ Information from NOD32 ________
> This message was checked by NOD32 Antivirus System for Linux Mail
Server.
> http://www.nod32.com

--

.

Reply | Threaded
Open this post in threaded view
|

Re: Quit other buffers

Marian Csontos
so what about: (not tested!)

:windo let b:xxx_do_not_close_this_window
:bufdo new | if !exists("b:xxx_do_not_close_this_window") | bdel | else |  
quit | endif

Regards

-- Marian

On Thu, 25 Aug 2005 11:43:20 +0200, Vishnu <[hidden email]> wrote:

> Is the question asked is to close other buffers or windows? The answers
> provided here are to close other windows.
>
...
>>> Hello
>>>
>>> Does vim provides a way when multiple buffers exist to close all the
> others
>>> than the current one. I have looked at :help quit but with no luck
>>>
>>> Thanks
>>> Giorgos


________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com
Reply | Threaded
Open this post in threaded view
|

RE: Quit other buffers

Keith W. Roberts
In reply to this post by vishnu-3
There was a thread on this awhile back; there may be a script or tip on it.

In any case, closing the other windows will also unload the buffers *if* you
operate with 'hidden' unset (the default).  :only will fail if buffers in
other windows are modified unless  'autowrite' is also set.  

:h :only
:h 'hid'
:h 'aw'
:h :hide

-Keith

> -----Original Message-----
> From: Vishnu [mailto:[hidden email]]
> Sent: Thursday, August 25, 2005 2:43 AM
> To: 'Vigil'
> Cc: 'Vim Mailing List'
> Subject: RE: Quit other buffers
>
> Is the question asked is to close other buffers or windows?
> The answers
> provided here are to close other windows.
>
> ~VIshnu
>
>
> -----Original Message-----
> From: Vigil [mailto:[hidden email]]
> Sent: Thursday, August 25, 2005 3:00 PM
> To: Vim Mailing List
> Subject: Re: Quit other buffers
>
> Or "ctrl-w o".
>
> On Thu, 25 Aug 2005, Marian Csontos wrote:
>
> > Hi,
> >
> > only one word:
> > :only
> >
> > Regards
> >
> > -- Marian
> >
> > On Thu, 25 Aug 2005 11:26:07 +0200, Giorgos Gaganis
> <[hidden email]>
> > wrote:
> >
> >> Hello
> >>
> >> Does vim provides a way when multiple buffers exist to
> close all the
> others
> >> than the current one. I have looked at :help quit but with no luck
> >>
> >> Thanks
> >> Giorgos
> >>
> >>
> >> ________ Information from NOD32 ________
> >> This message was checked by NOD32 Antivirus System for Linux Mail
> Server.
> >> http://www.nod32.com
> >>
> >>
> >> __________ Informacia od NOD32 1.1191 (20050810) __________
> >>
> >> Tato sprava bola preverena antivirusovym systemom NOD32.
> >> http://www.eset.sk
> >>
> >>
> >
> >
> > ________ Information from NOD32 ________
> > This message was checked by NOD32 Antivirus System for Linux Mail
> Server.
> > http://www.nod32.com
>
> --
>
> .
>
>
>