quickrun 後にコマンドを呼び出したタブに戻る hook
quickrun-runner に vimproc を設定すると非同期で処理が行われるので、実行中(コンパイル中)タブ移動することがよくあります。
わたしの場合は、quickrun 後に unite.vim へと出力を行なっているんですが、その時に移動した先のタブで unite.vim が開いてしまいます。
と、いう事で quickrun-hook で quickrun 後に元のタブへと戻る hook を書いてみました。
[ソース]
let s:hook = { \ "name" : "back_tab", \ "kind" : "hook", \ "config" : { \ "enable" : 1, \ "tabpagenr" : 0, \ } \} function! s:hook.on_hook_loaded(session, context) let self.config.tabpagenr = tabpagenr() endfunction function! s:hook.on_finish(session, context) :execute "tabnext" self.config.tabpagenr endfunction call quickrun#module#register(s:hook, 1) unlet s:hook