mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-26 04:00:29 +08:00
28 lines
479 B
VimL
28 lines
479 B
VimL
function! SpaceVim#api#vim#compatible#get() abort
|
|
return map({
|
|
\ 'execute' : '',
|
|
\ },
|
|
\ "function('s:' . v:key)"
|
|
\ )
|
|
endfunction
|
|
|
|
function! s:execute(cmd, ...) abort
|
|
if a:0 == 0
|
|
let s = 'silent'
|
|
else
|
|
let s = a:1
|
|
endif
|
|
redir => output
|
|
if s ==# 'silent'
|
|
silent execute a:cmd
|
|
elseif s ==# 'silent!'
|
|
silent! execute a:cmd
|
|
else
|
|
execute a:cmd
|
|
endif
|
|
redir END
|
|
return output
|
|
endfunction
|
|
|
|
" vim:set et sw=2 cc=80:
|