Nicolas Aggelidis wrote:
> sometimes i open some files to view their contents, in the
> same time i have open some other files that i edit...
> 
> because alot of times the names are very similar, is there
> any way to mark a file temporarily {for the session} as readonly?

If you are opening from within Vim (perhaps ':e file.txt' or ':edit
file.txt'), then you could use :view instead (':view file.txt'). Using
':help :view' shows that it is the same as :edit but it sets the
'readonly' option which you can also set:

:set readonly

Readonly allows you to change, but gives a warning. You have to use :w!
to write. Use ':set nomodifiable' to prevent changes.

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to