LoginSignup
1

More than 5 years have passed since last update.

vim - plugin - QFixGrep

Last updated at Posted at 2015-10-20

通常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 "指定文字列を含まない絞り込み

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1