通常grep
カーソルがある単語で検索 (:sil grep -nIH 単語 * )
g,g
カーソル下の単語で再帰検索 (:sil grep -rnIH --exclude-dir=".svn" --exclude-dir=".git" 単語 .)
g,r
vimrc での設定 (事前に外部grepをインストールしておく)
set grepprg=grep\ -rnIH\ --exclude-dir=.svn\ --exclude-dir=.git
autocmd QuickfixCmdPost make,grep cw
nnoremap g,g ':sil grep -nIH ' . expand('') . ' *'
nnoremap g,r ':sil grep -rnIH --exclude-dir=".svn" --exclude-dir=".git" ' . expand('') . ' .'
絞り込みgrep (QFixGrep)
※C-w . で QuickFixウインドウに戻れる
g,e "通常grep
g,re "再帰grep
g,f "固定文字列検索
g,rf "再帰固定文字列
g,b "現在開いているバッファのみ検索対象とする
↓
s "指定文字列で絞り込み
r "指定文字列を含まない絞り込み