Tuesday, June 29, 2010

Re: au BufReadPost * if &readonly | set nomodifiable

On Tue, Jun 29, 2010 at 2:24 AM, Tony Mechelynck
<antoine.mechelynck@gmail.com> wrote:
> Hm. Just a wild thought (untested): try the following (which assumes
> 'nocompatible'):
>
>
>  if has('autocmd')
>        au VimEnter * augroup nomodif
>        au VimEnter * au BufReadPost,BufNewFile * if &buftype == ""
>                \ | let &l:ma = &l:ro | endif
>        au VimEnter * augroup END
>  endif
>
>

Won't work. The problem seen here was a netrw bug that prevented the
'readonly' option from being set properly. This autocmd will still
fail because the readonly option is not being set.

I believe this issue in netrw was fixed, I vaguely remember reading
something on vim_dev. But, I don't recall the version it was fixed in.

Chip?

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

No comments:

Post a Comment