Sunday, September 16, 2012

Re: Buffer name changed after :edit command

> When I have a file opened in a window with the long name, and then I use
> :sv or :new with the short name as argument, then both statuslines
> display the short name from then on, howsoever I switch windows among
> them. Example:
>
> :pwd
> /root/.mozilla/seamonkey/nexrdon9.default
> :sv ../nexrdon9.default/chrome/userChrome.css
> statusline says: ../nexrdon9.default/chrome/userChrome.css
> :sv chrome/userChrome.css
> _both_ statuslines say: chrome/userChrome.css
> Ctrl-W p
> both statuslines still say: chrome/userChrome.css
>
> Similarly with
> ../../seamonkey/nexrdon9.default/chrome/userContent-example.css : as
> soon as I supply the short name, _both_ windows for that file get (and
> keep) the short name in their statusline.
>
>
> What happens if you open the file in a window with the short name first,
> and then pass expand('%') to MkVimball?
>
>
> FWIW, I'm using gvim 7.3.661 (Huge) with GTK2-GNOME GUI.

In my case (Vim 7.3.154, Huge version with GTK2 GUI, Slackware 13.37),
both windows display the original (long name).

A simple `:cd .` refreshes them both to use the short name, but not in a
script that is sourced or run with `vim -e` (not even with :redraw).

Is there way to check in advance that this would happen, so I can wipe
the damn buffer (and load if later) ?

About using expand('%'), Vimball documentation says the files should
always be relative (unless I intend to distribute some file like
/etc/opt/plugin-config) that is meant to be absolute).

Thank you,
Timothy Madden

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