On 16/09/12 21:14, Timothy Madden wrote:
>> 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
>
Well, expand('%:.') then. But expand('%') (without :p) ought to be good
enough.
Patch 7.3.154 was released on 2 April 2011. I recommend that you upgrade.
See http://ftp.vim.org/pub/vim/patches/7.3/README for a one-line summary
of each patch to Vim 7.3.
If Slackware distributes no version of Vim later than 7.3.154, then see
http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm
about how to compile your own Vim on Unix-like systems. (The former of
these web pages obsoletes the part of the latter about getting and
patching the source.)
Best regards,
Tony.
--
The Ruffed Pandanga of Borneo and Rotherham spreads out his feathers in
his courtship dance and imitates Winston Churchill and Tommy Cooper on
one leg. The padanga is dying out because the female padanga doesn't
take it too seriously.
-- Mike Harding, "The Armchair Anarchist's Almanac"
--
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
Sunday, September 16, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment