-----Original Message-----
From: Ingo Karkat <[email protected]>
To: vim_dev <[email protected]>
Sent: Fri, Oct 21, 2011 11:02 am
Subject: Re: [feature request] tab with independent buffer list


On 21-Oct-2011 07:32, Yue Wu wrote:
Hello, list,

As the title, if a tab can have a buffer list independent with other
tabs, then I can use tab to category the buffers, and one tab for one
project.

This is against Vim's model, and therefore unlikely to be implemented. However, you could write overloaded commands / command-completions (which commands do you have in mind? :ls, :buf, :sbuf?) in Vimscript that achieve just that. (And with
the cmdalias plugin could even replace the built-in commands).

For example, I have written a custom command that :bdeletes all buffers which are only visible in the current tab page, so that I can wipe an entire tab page
from my Vim instance.

Alternatively, there are several buffer-management plugins on vim.org, maybe
it'll help to investigate those and adapt your style of use?!

-- regards, ingo

--

I don't like this notion that a buffer group is against 'vims model' . After a brief perusing of the vim code I noticed that at +1619 structs.h the following:

/* Two special kinds of buffers:
1620      * help buffer  - used for help files, won't use a swap file.
1621 * spell buffer - used for spell info, never displayed and doesn't have a
1622      *                file name.
1623      */
1624 int b_help; /* TRUE for help file buffer (when set b_p_bt
1625                                    is "help") */
1626 #ifdef FEAT_SPELL
1627 int b_spell; /* TRUE for a spell file buffer, most fields 1628 are not used! Use the B_SPELL macro to 1629 access b_spell without #ifdef. */

In short, vim already has special groups of buffers. Normal buffers, help buffers, and spelling buffers. Adding a more versatile buffer 'tag' feature accessible to vimscript might be worthwhile. I would have to look at the code some more, but it might not be such a challenge if already existing functionality is used.

LHB
--
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui