> there may be different engines, we can only enable one of them at each
> vim session, the framework will call engine's initialization and some
> interface functions, inside the engine.vim script it may need to set
> some s:variables and access some s:functions inside framework.vim
callee.vim:
function SID()
return maparg('<SID>', 'n')
endfunction
nnoremap <SID> <SID>
function s:cript_local_function(...)
return string(a:000)
endfunction
caller.vim:
echo call(substitute('s:cript_local_function', '^s:', SID(), ''),
['Vim', 'is', 'forever'])
" ==> ['Vim', 'is', 'forever']
referencee.vim:
function Scope()
return s:
endfunction
let s:mile = 'XD'
referencer.vim:
let s = Scope()
echo s['mile']
" ==> 'XD'
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---