Friday, November 22, 2013

Re: Tabs vs buffers

Hi,

On Fri, Nov 22, 2013 at 6:06 AM, Nikolay Pavlov <zyx.vim@gmail.com> wrote:
>>> >
>>> > Is there a way to see for each tabs only the files opened in that tab?
>>> > The ls or buffers command will show all buffers for all tabs, I would like
>>> > the tab to behave like mini projects or categories of tasks.
>>>
>>> You mean like the :tabs command?
>>
>> I don't believe that is what I would be looking for.
>>
>> :h :tabs
>> |:tabs| List the tab pages and the windows they contain.
>>
>> I want to see which buffers each tab contains, not the windows.
>
> It lists buffer names.
>
> If you are talking about tabs containing buffers you are absolutely wrong.
> They do not contain buffers. The only things tabs do contain* is windows and
> windows in turn display (not contain) buffers.
>
> * Putting aside some unrelated things like t: dictionary with tab-local
> variables.
>
>> Since I always have :set hidden, I usually only have 1 window open per
>> tab.
>> Yet, I treat each tab as a "project" where I try to edit all files for
>> that given project in just that tab.
>>
>> I want to quickly switch between those buffers without spending a lot of
>> time trying to find the buffer I want out of a large number of open buffers.
>
> There are plugins like Command-T for that. I see no sense in what you do:
> list of buffers is global and I have not seen any plugin that will switch
> you to appropriate tab deduced on some condition and bring the buffer you
> seek there.
>

When switching between buffers, if the 'switchbuf' option contains 'usetab',
then Vim will switch to the tab containing the specified buffer (instead of
opening the buffer in the current tab). This works for the ":sbuffer",
":sbnext" and ":sbrewind" commands.

Note that you can still open a buffer in the current tab (even if it
is displayed
in another tab), using other commands like ":buffer".

- Yegappan

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: