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