Hi Gary!

On Di, 12 Okt 2010, Gary Johnson wrote:

> On 2010-10-12, Christian Brabandt wrote:
> > Hi Gary!
> > 
> > On Di, 12 Okt 2010, Gary Johnson wrote:
> > 
> > > On 2010-10-12, Gary Johnson wrote:
> > > > On 2010-10-12, Bee wrote:
> > > > > Benjamin R. Haskell wrote:
> > > > > > On Tue, 12 Oct 2010, Bee wrote:
> > > > > >
> > > > > > > What keeps clearing my spellcapcheck?
> > > > > >
> > > > > > What does this return?
> > > > > >
> > > > > > :verbose set spellcapcheck?
> > > > > 
> > > > > In the first buffer opened it returns:
> > > > > spellcapcheck=[.?!]\_[\])'"^I ]\+
> > > > > 
> > > > > When switching to another buffer:
> > > > > spellcapcheck=
> > > > > 
> > > > > What would cause it to be cleared on buffer switch?
> > > > > Both files are the same type xxx.txt
> > > > > Each opened by itself spellcapcheck is ok!
> > > > 
> > > > Looks like a bug to me.  I can replicate the problem like this.
> > > > 
> > > >     $ vim -u NONE
> > > >     :verbose set spellcapcheck?
> > > >       spellcapcheck=[.?!]\_[\])'"^I ]\+
> > > >     :new
> > > >     :verbose set spellcapcheck?
> > > >       spellcapcheck=
> > > >     :wincmd w
> > > >     :verbose set spellcapcheck?
> > > >       spellcapcheck=
> > > > 
> > > > Note that after switching to the new buffer, the option was cleared
> > > > even in the original buffer.
> > > 
> > > Sorry--forgot to report the version info.  I tested that using
> > > vim-7.3 on Cygwin on Windows XP and vim-7.3.3 on RHEL4.
> > > 
> > > Also, I retested with vim in 'nocompatible' mode with slightly
> > > different results in that 'spellcapcheck' retained its default value
> > > in the original buffer.
> > > 
> > >     $ vim -N -u NONE
> > >     :verbose set spellcapcheck?
> > >       spellcapcheck=[.?!]\_[\])'"^I ]\+
> > >     :new
> > >     :verbose set spellcapcheck?
> > >       spellcapcheck=
> > >     :wincmd w
> > >     :verbose set spellcapcheck?
> > >       spellcapcheck=[.?!]\_[\])'"^I ]\+
> > 
> > But that is ok, isn't it? spellcapcheck isn't supposed to work in 
> > compatible mode and I don't see an error for non-compatible mode.
> 
> The error, as I see it anyway, is that even in non-compatible mode,
> vim sets 'spellcapcheck' to the empty string in new buffers.
> 
> The help entry for 'spellcapcheck' says that the option is local to
> buffer and defaults to "[.?!]\_[\])'" \t]\+".  The value in a new
> buffer should therefore be "[.?!]\_[\])'" \t]\+", not an empty
> string.
> 

Yes, true. It's even worse then that with a file called spc.vim:
,----
| set spellfile=~/.vim/spellfile.add
| verbose set spc?
| new
| verbose set spc?
| wincmd p
| verbose set spc?
`----
vim -u NONE -N -i NONE +'so spc.vim'
Vim echoes:
  spellcapcheck=[.?!]\_[\])'"^I ]\+
  spellcapcheck=/home/chrisbra/.vim/spellfile.add
  spellcapcheck=[.?!]\_[\])'"^I ]\+


> Further, while 'spellcapcheck' may not be expected to work in
> compatible mode, in the sense that it will have no effect in
> compatible mode, I would expect it to be set to a consistent value.

True. I could swear, I tested with a different buffer-local option, 
which behaved the same, but now I can't reproduce it.

regards,
Christian

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

Reply via email to