Created
February 3, 2019 08:17
-
-
Save rbtnn/4634df821c34be873f9793a73d6e6471 to your computer and use it in GitHub Desktop.
QuickrunShowExpectedConfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function s:quickrun_show_expected_config(type) abort | |
let type = empty(a:type) ? &filetype : a:type | |
source $VIMPLUGINS/vim-quickrun/autoload/quickrun.vim | |
let xs = split(execute('scriptnames'), "\n") | |
let id = str2nr(get(filter(xs, { i, x -> x =~# 'autoload/quickrun.vim$' }), 0, '')) | |
let dict = function(printf("\<SNR>%d_build_config", id))({ 'type' : type }) | |
for key in keys(dict) | |
echo printf("%s: %s", key, string(dict[key])) | |
endfor | |
endfunction | |
command! -nargs=? QuickrunShowExpectedConfig :call <SID>quickrun_show_expected_config(<q-args>) | |
QuickrunShowExpectedConfig vim | |
" args: '' | |
" tempfile: '%{tempname()}' | |
" cmdopt: '' | |
" exec: '%C %s' | |
" mode: 'n' | |
" type: 'vim' | |
" command: ':source' | |
" outputter: 'buffer' | |
" runner: 'vimscript' | |
" hook/eval/template: 'echo %s' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment