I have an autoload vim script library th开发者_开发问答at I've gotten form vim.org. I don't want to change it directly but want to put something in my vimrc that augments one of the functions in that library so that whenever that function is called in that library, my function also gets called. How do I do that?
I'm afraid you will have to patch that function.
You may also automate the process this way:
- move
{rtp}/autoload/path/to/script.vimto{rtp}/autoload/path/to/script0.vim - apply
:%s/fu\%[nction]!\= *path#path#script#&0#gin the script moved - generate your own
{rtp}/autoload/path/to/script.vimthat forwards all calls to the original script.
加载中,请稍侯......
精彩评论