Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Buffer name changed after :edit command

Received: by 10.204.15.209 with SMTP id l17mr1006939bka.6.1347822878635;
        Sun, 16 Sep 2012 12:14:38 -0700 (PDT)
X-BeenThere: vim_use@googlegroups.com
Received: by 10.204.13.17 with SMTP id z17ls5896323bkz.5.gmail; Sun, 16 Sep
 2012 12:14:32 -0700 (PDT)
Received: by 10.204.130.7 with SMTP id q7mr999840bks.2.1347822871968;
        Sun, 16 Sep 2012 12:14:31 -0700 (PDT)
Received: by 10.204.130.7 with SMTP id q7mr999839bks.2.1347822871954;
        Sun, 16 Sep 2012 12:14:31 -0700 (PDT)
Return-Path: <gev-vim-mov...@m.gmane.org>
Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by gmr-mx.google.com with ESMTPS id j4si652946bkj.3.2012.09.16.12.14.31
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sun, 16 Sep 2012 12:14:31 -0700 (PDT)
Received-SPF: pass (google.com: domain of gev-vim-mov...@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gev-vim-mov...@m.gmane.org designates 80.91.229.3 as permitted sender) smtp.mail=gev-vim-mov...@m.gmane.org
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gev-vim-mov...@m.gmane.org>)
	id 1TDKIb-00042R-5N
	for vim_use@googlegroups.com; Sun, 16 Sep 2012 21:14:33 +0200
Received: from 188.27.90.111 ([188.27.90.111])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <vim_use@googlegroups.com>; Sun, 16 Sep 2012 21:14:33 +0200
Received: from terminatorul by 188.27.90.111 with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <vim_use@googlegroups.com>; Sun, 16 Sep 2012 21:14:33 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: vim_use@googlegroups.com
From: Timothy Madden <terminato...@gmail.com>
Subject: Re: Buffer name changed after :edit command
Date: Sun, 16 Sep 2012 22:14:01 +0300
Lines: 41
Message-ID: <k358ec$vuv$1@ger.gmane.org>
References: <k34jjp$40c$1@ger.gmane.org> <5055FF8F.2010405@gmail.com> <k350ls$5h3$1@ger.gmane.org> <50561365.7080...@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: use...@ger.gmane.org
X-Gmane-NNTP-Posting-Host: 188.27.90.111
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120616 Thunderbird/13.0.1
In-Reply-To: <50561365.7080...@gmail.com>

> 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