ソースを参照

Combine `easygrep.vim` into `search.vim`

All text search settings are now in one file.
Weiyi Lou 10 年 前
コミット
bbf13110f9
2 ファイル変更21 行追加19 行削除
  1. 0 19
      vim/settings/easygrep.vim
  2. 21 0
      vim/settings/search.vim

+ 0 - 19
vim/settings/easygrep.vim

@@ -1,19 +0,0 @@
-" use faster search tools if available
-if executable('ag')
-  set grepprg=ag\ --vimgrep\ $*
-  set grepformat=%f:%l:%c:%m
-elseif executable('ack')
-  set grepprg=ack\ --with-filename\ --nocolor\ --nogroup\ --column
-elseif executable('ack-grep')
-  set grepprg=ack-grep\ --with-filename\ --nocolor\ --nogroup\ --column
-endif
-
-" don't display ack/grep terminal output. NOTE: not reliable
-" https://github.com/mileszs/ack.vim/issues/18
-"set shellpipe=&>
-
-let g:EasyGrepCommand = 1            " Default to grepprg instead of vimgrep.
-let g:EasyGrepRecursive = 1
-let g:EasyGrepReplaceWindowMode = 2  " `Replace` in same window, not tabs/splits
-let g:EasyGrepFilesToExclude=".git"  " Exclude dirs for `ack` and `grep`
-let g:EasyGrepRoot = "search:.git,.hg,.svn"  " Repo-aware when possible.

+ 21 - 0
vim/settings/search.vim

@@ -7,3 +7,24 @@ function! ClearSearch()
     redraw
   endif
 endfunction
+
+" use faster search tools if available
+if executable('ag')
+  set grepprg=ag\ --vimgrep\ $*
+  set grepformat=%f:%l:%c:%m
+elseif executable('ack')
+  set grepprg=ack\ --with-filename\ --nocolor\ --nogroup\ --column
+elseif executable('ack-grep')
+  set grepprg=ack-grep\ --with-filename\ --nocolor\ --nogroup\ --column
+endif
+
+" don't display ack/grep terminal output. NOTE: not reliable
+" https://github.com/mileszs/ack.vim/issues/18
+"set shellpipe=&>
+
+" EasyGrep settings.
+let g:EasyGrepCommand = 1            " Default to grepprg instead of vimgrep.
+let g:EasyGrepRecursive = 1
+let g:EasyGrepReplaceWindowMode = 2  " `Replace` in same window, not tabs/splits
+let g:EasyGrepFilesToExclude=".git"  " Exclude dirs for `ack` and `grep`
+let g:EasyGrepRoot = "search:.git,.hg,.svn"  " Repo-aware when possible.