On 2012-01-10, Cesar Romani wrote:
> On 10/01/2012 07:50 p.m., Gary Johnson wrote:
> > On 2012-01-10, Cesar Romani wrote:
> >> On 10/01/2012 06:10 p.m., Gary Johnson wrote:
> >>> On 2012-01-10, Cesar Romani wrote:
> >>>> I'm using vim 7.3.401 on windows 7. I'm trying to edit a list of text
> >>>> files, say test1.txt, test2.txt and test3.txt, with a single vim. When
> >>>> I'm on test1.txt and do: set tw=72, this isn't set on the other files!
> >>>> If I do :n to go to the next file and do set tw? I get 78.
> >>>>
> >>>> Not long ago, before updating to 7.3.401, I used to edit a bunch of
> >>>> files, set tw=72 in one of them, and this was globally set on
> the other
> >>>> files. What happened?
> >>>>
> >>>> If I set sw=8 in one of them, it will be set on the other files,
> but not
> >>>> with tw.
> >>>
> >>> After setting tw=72 and executing :n, execute
> >>>
> >>> :verbose set tw?
> >>>
> >>> What does that show?
> >>
> >> I get:
> >>
> >> --------------------
> >> textwidth=78
> >> Last set from C:\Vim\vim73\vimrc_example.vim
> >> --------------------
> >>
> >> but I've never changed C:\Vim\vim73\vimrc_example.vim
> >
> > You may not have changed it explicitly, but it was apparently
> > changed as part of your update to 7.3.401.
> >
> > The change seems to have been made in 7.0, around June 2004, if I'm
> > reading the changelog correctly.
>
> It was last year, 2010, that I didn't have any problems with editing a
> list of files. I could set tw to 72 on one file and it was set globally
> on all files, as it should be.
I was afraid you were going to say something like that. I don't
know what changed to cause your vimrc_example.vim to start having
that effect.
BTW, last year was 2011.
> Anyway if I set tw to 72, it should be set globally, not locally. Is it
> right?
":help tw" says that the setting is local to buffer, but that
doesn't really describe the behavior. The behavior is supposedly
described in ":help option-summary", but that doesn't match my
observations.
I started vim as
vim -N -u NONE a
and executed
:set tw?
I saw the result "textwidth=0" as expected. Then I did the
following:
:set tw=50
:split b
:set tw?
textwidth=50
Again, as expected.
:set tw=60
:wincmd w
:set tw?
textwidth=50
:split c
:set tw?
textwidth=60
I would have expected the 'textwidth' of buffer c to be 50, since
buffer a was the active buffer/window when ":split c" was executed.
Regards,
Gary
--
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