Created
May 8, 2011 16:57
-
-
Save Takazudo/961497 to your computer and use it in GitHub Desktop.
This file contains 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
" Ggisty | |
" just grep the gist directory. | |
" needs gisty to use this. see the pages below. | |
" http://d.hatena.ne.jp/swdyh/20081207/1228655198 | |
" TODO: needs to handle 'No match' error | |
" | |
" write the code to .vimrc to define gists root dir | |
" | |
"let g:ggistyRootPath = '~/dev/gists' | |
" | |
command! -nargs=+ Ggisty call s:ggisty(<q-args>) | |
function! s:ggisty(args) | |
silent execute 'vimgrep /' . a:args . '/j ' . g:ggistyRootPath . '/** | cw' | |
if len(getqflist()) != 0 | |
copen | |
else | |
exit | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment