You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
446 B
17 lines
446 B
if !has('python') |
|
echo "Vim must support python in order to use the repeater" |
|
finish |
|
endif |
|
|
|
let s:pyscript = resolve(expand('<sfile>:p:h') . '/repeater.py') |
|
|
|
function! RepeaterAction(...) |
|
execute 'pyfile ' . s:pyscript |
|
endfunc |
|
|
|
command! -nargs=* RepeaterSetup call RepeaterAction('setup', <f-args>) |
|
command! RepeaterSubmitBuffer call RepeaterAction('submit') |
|
|
|
" Bind forward to <leader>f |
|
nnoremap <leader>f :RepeaterSubmitBuffer<CR> |
|
|
|
|