Skip to content

Instantly share code, notes, and snippets.

@KentaYamada
Last active May 17, 2019 04:35
Show Gist options
  • Save KentaYamada/d5ce48d313208a6bf3978b6bd69290e8 to your computer and use it in GitHub Desktop.
Save KentaYamada/d5ce48d313208a6bf3978b6bd69290e8 to your computer and use it in GitHub Desktop.
vimproc quickrun rsync config
let g:quickrun_config = get(g:, 'quickrun_config', {})
let g:quickrun_config._ = {
\ 'runner': 'vimproc',
\ 'runner/vimproc/updatetime': 40,
\ 'outputter': 'error',
\ 'outputter/error/success': 'buffer',
\ 'outputter/error/error': 'quickfix',
\ 'hook/close_quickfix/enable_exit': 1
\ }
" register sync command
let g:quickrun_config['sync_hoge'] = {
\ 'command': 'rsync',
\ 'cmdopt': '-hruvz --checksum --exclude=".*" --progress -e',
\ 'args': '"ssh -i ssh_key" local_path username\@hostname:host_directory',
\ 'exec': '%c %o %a',
\ 'outputter/error/success': 'null',
\ }
augroup SyncHogeCmd
autocmd!
autocmd BufWritePost *.php :QuickRun sync_hoge
autocmd BufWritePost *.js :QuickRun sync_hoge
autocmd BufWritePost *.ctp :QuickRun sync_hoge
autocmd BufWritePost *.html :QuickRun sync_hoge
autocmd BufWritePost *.css :QuickRun sync_hoge
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment