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 bufdo and tabs

Received: by 10.180.97.162 with SMTP id eb2mr4738318wib.0.1352884480408;
        Wed, 14 Nov 2012 01:14:40 -0800 (PST)
X-BeenThere: vim_use@googlegroups.com
Received: by 10.180.77.228 with SMTP id v4ls10013111wiw.0.canary; Wed, 14 Nov
 2012 01:14:09 -0800 (PST)
Received: by 10.180.79.138 with SMTP id j10mr4745458wix.1.1352884449027;
        Wed, 14 Nov 2012 01:14:09 -0800 (PST)
Received: by 10.180.79.138 with SMTP id j10mr4745457wix.1.1352884448988;
        Wed, 14 Nov 2012 01:14:08 -0800 (PST)
Return-Path: <msza...@gmail.com>
Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180])
        by gmr-mx.google.com with ESMTPS id q8si999789wiw.3.2012.11.14.01.14.08
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 14 Nov 2012 01:14:08 -0800 (PST)
Received-SPF: pass (google.com: domain of msza...@gmail.com designates 209.85.212.180 as permitted sender) client-ip=209.85.212.180;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of msza...@gmail.com designates 209.85.212.180 as permitted sender) smtp.mail=msza...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-wi0-f180.google.com with SMTP id x18so103575wia.3
        for <vim_use@googlegroups.com>; Wed, 14 Nov 2012 01:14:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:subject:message-id:mail-followup-to:references
         :mime-version:content-type:content-disposition:in-reply-to
         :user-agent;
        bh=6/MgS5//dqBOaQxx5I4hhTUDvB3JDolYzIfC/Q21gKs=;
        b=OhIOq+LwHOvT4Oj1kmF7z3G8RexOLIKInhEA2U4Gt4QccmLQJ/RM2M7qtxkeuVM6uH
         1QwnyYLjBKHBB4HgJd7cBNOQguT+BRo5ByMqUfkFx9iMcfwGhgQX//3xnIuhANtRsQeZ
         Vc9t1WdETcITQjGA4jMo42YpmRCfEdX4GkgeYEc/YRNXI2IEhMq1kBpGG/2GshaSac7K
         FPelWdHC6jmor2FwZfPrnddnvXYBVwXqQaslDhQVRmDc7ugRotQgk1deq5dFnSXP4pV5
         bjxeKdRnnet7FRnmTQau6vV1DLHu2typ4aHk63Ynotz4OFR66eF1UwEs29pCtA5jZ/sf
         Noqg==
Received: by 10.216.202.97 with SMTP id c75mr1478615weo.211.1352884448789;
        Wed, 14 Nov 2012 01:14:08 -0800 (PST)
Return-Path: <msza...@gmail.com>
Received: from msza...@gmail.com (bl11-7-224.dsl.telepac.pt. [85.244.7.224])
        by mx.google.com with ESMTPS id n2sm22393440wix.6.2012.11.14.01.14.06
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 14 Nov 2012 01:14:07 -0800 (PST)
Received: by msza...@gmail.com (sSMTP sendmail emulation); Wed, 14 Nov 2012 09:13:36 +0000
Date: Wed, 14 Nov 2012 09:13:36 +0000
From: Marcin Szamotulski <msza...@gmail.com>
To: vim_use@googlegroups.com
Subject: Re: bufdo and tabs
Message-ID: <20121114091336.GA14099@flying_circus>
Mail-Followup-To: Marcin Szamotulski <msza...@gmail.com>,
	vim_use@googlegroups.com
References: <BAY161-W583D6D9F270B6C9E4E9E9ADC...@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <BAY161-W583D6D9F270B6C9E4E9E9ADC...@phx.gbl>
User-Agent: Mutt/1.5.21 (2010-09-15)

On 02:10 Wed 14 Nov     , Roy Fulbright wrote:
> 
> 
> 
> 
> I'm using gvim 7.3.600 on Windows 7. I have three files opened in tabs (tab1=a.txt, tab2=b.txt, tab3=c.txt).
> All three files contain the string 'abc'. When I use :bufdo :%s/abc/def/ I get message E37: No write since last
> change (add ! to override). When I use :bufdo! :%s/abc/def/ all files are changed, but
> now tab1 and tab3 both contain c.txt. What happened to a.txt in tab1? If I do :wa then exit and look at the files, all three files are changed.
> It's tab1 displaying the same file as tab3 after the :bufdo! that's puzzling. Is this a bug or am I missing something regarding bufdo and tabs? Thanks. 		 	   		  
> 
> -- 
> 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

I think this is expected.  The bufdo command does the job in the current
window, and the last file it operates on is the c.txt.  Thus it will
leave it in the current window (see :help bufdo).  To avoid the E37
error you can also use:
    set hidden

Best,
    Marcin