Skip to content

Instantly share code, notes, and snippets.

@Takazudo
Created May 8, 2011 16:57
Show Gist options
  • Save Takazudo/961497 to your computer and use it in GitHub Desktop.
Save Takazudo/961497 to your computer and use it in GitHub Desktop.
" 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