- AFAIK, "editibg a directory" requires the netrw plugin
- 'formatoptions' is local to buffer; if you specify neither ":setlocal
fo?" not ":setglobal fo?", neither &l:fo nor &g:fo, what you get is the
buffer-local copy, not the global default.
Yes, but that's the value in effect when editing the new buffer. The
point is that after using netrw the value for new buffers changes --
i.e. the global value has changed (&g:fo = cqrw).
- If the global default is modified too, then there could be a bug in
netrw.vim
That's what I'd assume.
At line 2786, we find:
fun! netrw#DirBrowse(dirname)
if !exists("w:netrw_longlist")|let w:netrw_longlist= g:netrw_longlist|endif
" call Dfunc("DirBrowse(dirname<".a:dirname.">) buf#".bufnr("%")." winnr=".winnr()."
sortby=".g:netrw_sort_by." hide=".g:netrw_hide)
" call Dredir("ls!")
if exists("s:netrw_skipbrowse")
unlet s:netrw_skipbrowse
" call Dret("DirBrowse")
return
endif
if &fo =~ '[ta]'
set fo-=t
set fo-=a
echohl Warning
echo '***warning*** directory browsing and formatoptions "ta" are
incompatible'
echohl None
endif
Regards,
Thomas.