On 8/21/06, Preben Randhol <[EMAIL PROTECTED]> wrote:
Hi againI have another question... I'm trying to make a function to open files for editing from a function. however I keep getting an error. I have included a very simple functions that gives the same error message. I understand that one cannot do it this way, but I don't know how to do it: function! Read_test() execute "e somefile" endfunction I get this error: E127: Cannot redefine function Read_test: It is in use
Works for me, even if I place this code into file called "somefile". Your example is incomplete. Try to make your example more comlpete by specifying precise filenames and everything typed from vim start. In general, this error means when you do :source command from within the function (not :edit command, like you), and when :source commands tries to redefine the function which is active. Yakov
