How do I execute a command when I try to modify a read-only file?
You can use the FileChangedRO autocommand event to execute a command when a read-only file is modified. For example, you can use this event to checkout a read-only file:
:autocmd FileChangedRO * call MyCheckoutFunction()
Comments (1)
Pepsh Pepshinsky
Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE