mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 11:00:05 +08:00
23 lines
535 B
Plaintext
23 lines
535 B
Plaintext
Given vim:
|
|
command! -nargs=+ TestIt call s:func(<f-args>)
|
|
execute "command! -nargs=0 TestFlip let s:var = 'hello'"
|
|
execute 'let s:var = "bar"'
|
|
echomsg s:var
|
|
function! s:nested(a, b)
|
|
TestIt
|
|
TestFlip
|
|
endfunc
|
|
|
|
Execute (:call lookup#lookup() to find definition of commands):
|
|
" on TestIt
|
|
normal! 6G
|
|
AssertEqual [6, 3], [line('.'), col('.')]
|
|
call lookup#lookup()
|
|
AssertEqual [1, 22], [line('.'), col('.')]
|
|
|
|
" on TestFlip
|
|
normal! 7G
|
|
call lookup#lookup()
|
|
AssertEqual [2, 31], [line('.'), col('.')]
|
|
|