Sunday, June 20, 2010

Re: Problem with default titlestring

Saluton John :)

John Beckett <j...@gmail.com> skribis:
> Raúl Núñez de Arenas Coronado wrote:
>> Apart from that, I don't know what the parentheses mean, and I don't
>> know if the "2" means "two files" (would be correct) or "two buffers"
>> (would be wrong).
>
> A bit of exploring makes me think the following.
>
> You start with 'vim one.txt two.txt' then ':bd' but you have not done
> ':next'. So Vim started by displaying one.txt which was the first file
> in an argument list of two (1 of 2). The :bd makes the 1 invalid, so
> it is placed in parentheses which indicates that you are up to
> argument 1, but you are editing some other file.

That makes perfect sense to me. Have you found it in the help?

> I believe the (1 of 2) is talking about the argument list, so it's not
> quite buffers or files.

Yes, I noticed it when I discovered the "%a" expansion in the status
line. I've found some ways of putting there the number of buffers, but I
think it is overlay complex and doesn't worth the pain.

> BTW after :bd there still are two buffers, but one of them is
> unlisted. Enter :ls! to see that you still have two buffers. Use :bw
> to really wipeout a buffer (but that makes Vim forget things like last
> edited position and any marks).

Oh, that I knew. In fact I was using ":bw!" when doing the experiment.
What I was doing, BTW, is processing a huge number of text files. I
loaded all of them in Vim and mapped "<delete>" to a combination that
deleted the on-disk file and wiped out the buffer. That way I could read
and delete the files without having to go back and forth between a
terminal and Vim. I then noticed the problem with the title string.

Thanks for the info!

--
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
The revolution will not be televised

--
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

No comments: