44190Re: question for charles (or anyone): netrw whacking t
- Jul 11 8:09 PMOn Tue, Jul 11, 2006 at 06:53:23PM -0500, scott wrote:
> charles--I think I see the problem. In $VIMRUNTIME/autoload/netrw.vim , in
> i have formatoptions set in my .vimrc to tcroqn
> i have a script i call gvime that starts 'vim -g -c Explore'
> (i tried 'gvim -c Explore' with the same result)
> if i run gvime, and select a file to edit, i find
> formatoptions is now croqn -- the t has been whacked,
> and even with a modeline setting textwidth, i am
> manually formatting paragraphs, running scriptnames,
> and generally having a bad day
the function netrw#DirBrowse() , there are the lines
if &fo =~ '[ta]'
echo '***warning*** directory browsing and formatoptions "ta" are incompatible'
(I am not sure that I ever get to see that warning message.) I think
that replacing :set with :setlocal will fix the problem. Remember, when
dealing with a local option, :set changes both the local value and the
global default; :setlocal changes only the value.
I think other options are being affected, too. I am too
bleary-eyed to be sure, but I think that 'spell' and 'tw' in other
buffers are being affected by the netrw window. I think the problem
comes from lines like
if exists("w:spellkeep")|let &spell = w:spellkeep |unlet w:spellkeep|endif
if exists("w:twkeep") |let &tw = w:twkeep |unlet w:twkeep |endif
:let &spell = ...
I think it should be
:let &l:spell = ...
HTH --Benji Fisher
- << Previous post in topic Next post in topic >>