Skip to content

Instantly share code, notes, and snippets.

@rohinomiya
Created August 17, 2012 04:35
Show Gist options
  • Save rohinomiya/3375956 to your computer and use it in GitHub Desktop.
Save rohinomiya/3375956 to your computer and use it in GitHub Desktop.
Vimからmilkodeのgmilkコマンドを使う(Unite版) ref: http://qiita.com/items/abe5df7c5b21160532b8
NeoBundle 'Shougo/unite.vim'
NeoBundle 'sgur/unite-qf'
:NeoBundleInstall
" gmilk コマンドの結果をUnite qf で表示する
command! -nargs=1 Gmilk call s:Gmilk("gmilk -a -n 200", <f-args>)
function! s:Gmilk(cmd, arg)
silent execute "cgetexpr system(\"" . a:cmd . " ". a:arg . "\")"
if len(getqflist()) == 0
echohl WarningMsg
echomsg "No match found."
echohl None
else
execute "Unite -auto-preview qf"
redraw!
endif
endfunction
:Gmilk [検索語句]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment