On Thursday, Sep 18, 2003, at 18:52 Asia/Jerusalem, Erez Doron wrote:


what i still need is that if the file is read-only, whenver i press 'i' for insert or 'o' or I or a or A etc ... that it will do what f9 does,
( and also get rid of the 'y' i have to answer)

OK, what you need is (a) to define a function in .vimrc to perform the operation you want, and (b) define an autocmd to run that function. The autocmd should respond to the event FileChangedRO. Actually, the help system says: "FileChangedRO - Before making the first change to a read-only file. Can be used to check-out the file from a source control system".


Now, for details, open vim and write ":help autocmd". As for defining a function, use ":help function". I use this system to change the hebrew Aleph whenever the encoding is changed from iso to unicode.

Herouth


================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]



Reply via email to