Skip to content

Instantly share code, notes, and snippets.

@rbtnn
Created February 3, 2019 08:17
Show Gist options
  • Save rbtnn/4634df821c34be873f9793a73d6e6471 to your computer and use it in GitHub Desktop.
Save rbtnn/4634df821c34be873f9793a73d6e6471 to your computer and use it in GitHub Desktop.
QuickrunShowExpectedConfig
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