超久しぶりに vim を使ってみようと 0 から設定してました。
Unite -auto-preview grep
したいので、昔ながらに
if executable('ag') let g:unite_source_grep_command = 'ag' let g:unite_source_grep_default_opts = '--nogroup --nocolor --column' let g:unite_source_grep_recursive_opt = '' endif
してみたんですが、
検索はされてマッチした一覧が表示されても
選択して該当箇所にとぼうとすると失敗して空バッファが開く……。
emacs で ag つかったときもあった〜なんて思いながら
ag のオプションをうたがっていると、
--vimgrep オプションがあったので
unite_source_grep_default_opts の内容を
if executable('ag') let g:unite_source_grep_command = 'ag' let g:unite_source_grep_default_opts = '--vimgrep' let g:unite_source_grep_recursive_opt = '' endif
とするとちゃんと動くようになりました。