Re: Doing :bufdo tabnew causes vim to hang, hog all resources

2008-02-07 Fir de Conversatie Tony Mechelynck

Anand Hariharan wrote:
 
 
 On Feb 6, 1:36 am, Tony Mechelynck [EMAIL PROTECTED]
 wrote:
 Anand Hariharan wrote:

 [...] Ben says For every tab, Vim adds a new tab.  It seems counter-
 intuitive to me considering that my command is *bufdo* tabnew (i.e.,
 for each *buffer* create a new tab).
 [...]

 Yes: for each buffer, add a new tab with a new [No Name] buffer in it. So we
 have one more buffer. The result is actually: for each buffer, add a new [No
 Name] buffer. You should have checked :help :tabnew, it mentions that with
 no argument, it creates a new tab with an empty window.

 
 Yes, it says new _window_, not a new buffer.  In order to make that
 extrapolation from new window as to imply new buffer, one needs to
 know the following:
 
 
 You may have several windows to a single buffer, in the same tab or in
 different tabs, but creating a new empty window actually also creates a new
 [No Name] buffer to contain whatever edits you'll make in that empty 
 window.

 
 I hope you find it reasonable that one could find the distinction
 between tabs, buffers and windows very subtle.
 
 Thank you all for responding.  I suppose, just like the editor itself,
 I should let the tab feature 'grow' on me, because (again just like
 the editor itself), my first impression has not been very favourable!
 I once swore /at/ vi, but I would now swear /by/ it! ;-)
 
 - Anand

Which windows are open at any moment is rather obvious, at least for the 
current tab. (They are separated by their status lines; whether the bottom 
window has a status line is governed by the 'laststatus' option.)

To determine which buffers are currently known, you can use :ls!. (Without 
the exclamation mark, it hides the so-called unlisted buffers.) Some of them 
may not be in memory: see :help :ls for the meaning of the codes in the left 
margin of the list.


Best regards,
Tony.
-- 
The Lord gave us farmers two strong hands so we could grab as much as
we could with both of them.
-- Joseph Heller, Catch-22

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



Re: Doing :bufdo tabnew causes vim to hang, hog all resources

2008-02-06 Fir de Conversatie Anand Hariharan



On Feb 6, 12:44 am, Ben Schmidt [EMAIL PROTECTED] wrote:
  Ben says For every tab, Vim adds a new tab.  It seems counter-
  intuitive to me considering that my command is *bufdo* tabnew (i.e.,
  for each *buffer* create a new tab).

  Just seeking to understand here:  Do tabs transcend buffers or vice-
  versa (i.e., can I have a set of buffers in a tab that the buffer
  lists in other tabs do not know?  Or can a tab be agnostic of buffers
  loaded by vim?).

 O, yes, sorry; I didn't explain fully. :tabnew creates a new tab with a new,
 empty, buffer. So, yes, you are right, it's because there is a new *buffer* 
 that
 it keeps going and going and going; the fact that a new tab comes with each 
 buffer
 is just coincidental.


Thank you for the above explanation, and your perspective of using
tabs in the follow-up after reviewing my post.  Much appreciated.


 It might work if you used :tabedit which edits a file in a new tab, rather 
 than
 opening a new file in a tab, i.e.

 :bufdo tabedit


Am afraid that has the same effect as :bufdo tabnew, but you gave me
the correct answer in your very first reply.

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



Re: Doing :bufdo tabnew causes vim to hang, hog all resources

2008-02-06 Fir de Conversatie Anand Hariharan



On Feb 6, 1:36 am, Tony Mechelynck [EMAIL PROTECTED]
wrote:
 Anand Hariharan wrote:

 [...] Ben says For every tab, Vim adds a new tab.  It seems counter-
  intuitive to me considering that my command is *bufdo* tabnew (i.e.,
  for each *buffer* create a new tab).

 [...]

 Yes: for each buffer, add a new tab with a new [No Name] buffer in it. So we
 have one more buffer. The result is actually: for each buffer, add a new [No
 Name] buffer. You should have checked :help :tabnew, it mentions that with
 no argument, it creates a new tab with an empty window.


Yes, it says new _window_, not a new buffer.  In order to make that
extrapolation from new window as to imply new buffer, one needs to
know the following:


 You may have several windows to a single buffer, in the same tab or in
 different tabs, but creating a new empty window actually also creates a new
 [No Name] buffer to contain whatever edits you'll make in that empty window.


I hope you find it reasonable that one could find the distinction
between tabs, buffers and windows very subtle.

Thank you all for responding.  I suppose, just like the editor itself,
I should let the tab feature 'grow' on me, because (again just like
the editor itself), my first impression has not been very favourable!
I once swore /at/ vi, but I would now swear /by/ it! ;-)

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



Doing :bufdo tabnew causes vim to hang, hog all resources

2008-02-05 Fir de Conversatie Anand Hariharan

Running 7.1.242 by building SVN source revision 859.  However, I
observed this problem almost a year ago (cf MID:
[EMAIL PROTECTED]).

First of all, I admit not understanding the window-tab feature.  All I
was trying to do was see if I could create a tab for each buffer.

So I try

:bufdo tabnew

I am not sure if this is a no-no or something meaningless, but it
causes vim to hang, hogging all system resources.

Doing a ^C recovers the session, but many many many tabs are created
during that time.

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



Re: Doing :bufdo tabnew causes vim to hang, hog all resources

2008-02-05 Fir de Conversatie ap



On Feb 6, 6:21 am, Anand Hariharan [EMAIL PROTECTED]
wrote:
 Running 7.1.242 by building SVN source revision 859.  However, I
 observed this problem almost a year ago (cf MID:
 [EMAIL PROTECTED]).

 First of all, I admit not understanding the window-tab feature.  All I
 was trying to do was see if I could create a tab for each buffer.

 So I try

 :bufdo tabnew

 I am not sure if this is a no-no or something meaningless, but it
 causes vim to hang, hogging all system resources.

 Doing a ^C recovers the session, but many many many tabs are created
 during that time.

 FYI,
 - Anand

What you are doing is similar to this :

foreach element in list
add newelement to list

But I would consider it a bug, since your command appears
to nullify the 'tabpagemax' option, which sets a fixed maximum
number of tabpages.
But yes, it's a pretty nonsensical command. You probably
want this instead :
:tab sball

-ap

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



Re: Doing :bufdo tabnew causes vim to hang, hog all resources

2008-02-05 Fir de Conversatie Anand Hariharan



On Feb 5, 11:21 pm, Anand Hariharan [EMAIL PROTECTED]
wrote:
 Running 7.1.242 by building SVN source revision 859.  However, I
 observed this problem almost a year ago (cf MID:
 [EMAIL PROTECTED]).

 First of all, I admit not understanding the window-tab feature.  All I
 was trying to do was see if I could create a tab for each buffer.

 So I try

 :bufdo tabnew

 I am not sure if this is a no-no or something meaningless, but it
 causes vim to hang, hogging all system resources.

 Doing a ^C recovers the session, but many many many tabs are created
 during that time.

 FYI,
 - Anand

Thanks to both Ben and 'ap' for the prompt replies.

Ben says For every tab, Vim adds a new tab.  It seems counter-
intuitive to me considering that my command is *bufdo* tabnew (i.e.,
for each *buffer* create a new tab).

Just seeking to understand here:  Do tabs transcend buffers or vice-
versa (i.e., can I have a set of buffers in a tab that the buffer
lists in other tabs do not know?  Or can a tab be agnostic of buffers
loaded by vim?).

I also had some philosophical questions in my post whose MID I
referred above (as in Why tabs?).

Would appreciate any insights.

Thanks to both of you again.  I verified that :tab sball works just as
I intended bufdo tabnew to work.

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



Re: Doing :bufdo tabnew causes vim to hang, hog all resources

2008-02-05 Fir de Conversatie ap

I retract, what I said about it beeing a bug. I just read
'tabpagemax'.



 Thanks to both Ben and 'ap' for the prompt replies.

 Ben says For every tab, Vim adds a new tab.  It seems counter-
 intuitive to me considering that my command is *bufdo* tabnew (i.e.,
 for each *buffer* create a new tab).

 Just seeking to understand here:  Do tabs transcend buffers or vice-
 versa (i.e., can I have a set of buffers in a tab that the buffer
 lists in other tabs do not know?  Or can a tab be agnostic of buffers
 loaded by vim?).

 I also had some philosophical questions in my post whose MID I
 referred above (as in Why tabs?).

 Would appreciate any insights.

 Thanks to both of you again.  I verified that :tab sball works just as
 I intended bufdo tabnew to work.

 sincerely,
 - Anand

There is only 1 bufferlist in an vim instance. tabs more like windows,
a view of a buffer.

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



Re: Doing :bufdo tabnew causes vim to hang, hog all resources

2008-02-05 Fir de Conversatie Ben Schmidt

 There is only 1 bufferlist in an vim instance. tabs more like windows,
 a view of a buffer.

Yes. Vim has a single buffer list, and a bunch of tabpages. Each tabpage has 
one 
or more windows. Each window is a view of a buffer. :tabnew, :tabedit, etc. 
make a 
new tabpage with a single window--new makes it with a new empty buffer 
(possibly 
with a filename supplied for later writes), edit does it with the current 
buffer 
or a different file if provided a filename (it reads the file).

Ben.





Send instant messages to your online friends http://au.messenger.yahoo.com 


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



Re: Doing :bufdo tabnew causes vim to hang, hog all resources

2008-02-05 Fir de Conversatie Ben Schmidt

 Ben says For every tab, Vim adds a new tab.  It seems counter-
 intuitive to me considering that my command is *bufdo* tabnew (i.e.,
 for each *buffer* create a new tab).
 
 Just seeking to understand here:  Do tabs transcend buffers or vice-
 versa (i.e., can I have a set of buffers in a tab that the buffer
 lists in other tabs do not know?  Or can a tab be agnostic of buffers
 loaded by vim?).

O, yes, sorry; I didn't explain fully. :tabnew creates a new tab with a new, 
empty, buffer. So, yes, you are right, it's because there is a new *buffer* 
that 
it keeps going and going and going; the fact that a new tab comes with each 
buffer 
is just coincidental.

It might work if you used :tabedit which edits a file in a new tab, rather than 
opening a new file in a tab, i.e.

:bufdo tabedit

 I also had some philosophical questions in my post whose MID I
 referred above (as in Why tabs?).

I don't know how to search for a message by its MID, I'm afraid. Does google 
have 
a facility for it or something? Can you provide a link to the webpage view of 
the 
message or something?

Cheers,

Ben.



Send instant messages to your online friends http://au.messenger.yahoo.com 


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



Re: Doing :bufdo tabnew causes vim to hang, hog all resources

2008-02-05 Fir de Conversatie Jürgen Krämer


Hi,

Ben Schmidt wrote:
 
 I also had some philosophical questions in my post whose MID I
 referred above (as in Why tabs?).
 
 I don't know how to search for a message by its MID, I'm afraid. Does google 
 have 
 a facility for it or something? Can you provide a link to the webpage view of 
 the 
 message or something?

go to http://groups.google.com/advanced_group_search, enter the MID
in the Message-ID field and you will be redirected to
http://groups.google.com/group/comp.editors/msg/9c4cf8becf4c29b5.

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

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