Skip to content

Instantly share code, notes, and snippets.

@rohinomiya
Created August 17, 2012 04:34
Show Gist options
  • Save rohinomiya/3375954 to your computer and use it in GitHub Desktop.
Save rohinomiya/3375954 to your computer and use it in GitHub Desktop.
Vimからmilkodeのgmilkコマンドを使う(Quickfix版) ref: http://qiita.com/items/5a2b48f6f93c4ecc983b
" gmilk コマンドの結果でQuickFixする
command! -nargs=1 Gmilk call s:Gmilk("gmilk -a -n 10", <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
cwindow
redraw!
endif
endfunction
:Gmilk [検索したい語句]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment