Hi Chip,
I've been enjoying flying around a large source tree using netrw, but
have discovered that when opening read-only files from the local
browse mechanism, setlocal noro is done on the new buffer anyway.
The offending line is near the end of the NetrwBrowseChgDir function
in netrw.vim. A minimal patch against netrw version 132 (as included
with Vim 7.2) that fixes the issue for me is below. (Please forgive
the inlinining; I figured it was simple and small enough to just
include here directly.)
>From a quick glance, it looks like this would still patch the latest
netrw okay, if at a distant offset.
Thanks,
Steve
--- netrw.vim.orig 2010-05-19 09:39:11.734082000 -0700
+++ netrw.vim 2010-05-20 19:19:48.905330000 -0700
@@ -2907,7 +2907,10 @@
call s:NetrwOptionRestore("s:")
if dolockout
" call Decho("doing modification lockout settings: ma nomod noro")
- setlocal ma nomod noro
+ setlocal ma nomod
+ if filewritable(expand("%"))
+ setlocal noro
+ endif
" call Decho("setlocal ma nomod noro")
endif
--
Steven Mueller
--
You received this message from the "vim_dev" 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