Created
August 17, 2012 04:34
-
-
Save rohinomiya/3375954 to your computer and use it in GitHub Desktop.
Vimからmilkodeのgmilkコマンドを使う(Quickfix版) ref: http://qiita.com/items/5a2b48f6f93c4ecc983b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:Gmilk [検索したい語句] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment