Skip to content

Commit d84e501

Browse files
committed
fix unite grep, and post_source init
1 parent 4bcb184 commit d84e501

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

vimrc

+16-14
Original file line numberDiff line numberDiff line change
@@ -552,19 +552,20 @@
552552
call unite#custom#profile('default', 'context', { 'start_insert': 1 })
553553
endfunction
554554
call dein#add('Shougo/unite.vim', {'hook_post_source': function('s:on_unite_source')}) "{{{
555-
556-
let g:unite_data_directory=s:get_cache_dir('unite')
557-
let g:unite_source_history_yank_enable=1
558-
let g:unite_source_rec_max_cache_files=5000
559-
560555
if executable('ag')
561-
let g:unite_source_grep_command='ag'
562-
let g:unite_source_grep_default_opts='--nocolor --line-numbers --nogroup -S -C4'
563-
let g:unite_source_grep_recursive_opt=''
556+
let g:unite_source_grep_command = 'ag'
557+
let g:unite_source_grep_default_opts =
558+
\ '-i --vimgrep --hidden --ignore ' .
559+
\ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'''
560+
let g:unite_source_grep_recursive_opt = ''
561+
elseif executable('pt')
562+
let g:unite_source_grep_command = 'pt'
563+
let g:unite_source_grep_default_opts = '--nogroup --nocolor'
564+
let g:unite_source_grep_recursive_opt = ''
564565
elseif executable('ack')
565-
let g:unite_source_grep_command='ack'
566-
let g:unite_source_grep_default_opts='--no-heading --no-color -C4'
567-
let g:unite_source_grep_recursive_opt=''
566+
let g:unite_source_grep_command = 'ack'
567+
let g:unite_source_grep_default_opts = '-i --no-heading --no-color -k -H'
568+
let g:unite_source_grep_recursive_opt = ''
568569
endif
569570

570571
function! s:unite_settings()
@@ -869,12 +870,13 @@
869870
endif
870871

871872
call dein#end()
872-
filetype plugin indent on
873-
syntax enable
874-
875873
if dein#check_install()
876874
call dein#install()
877875
endif
878876

877+
autocmd VimEnter * call dein#call_hook('post_source')
878+
879+
filetype plugin indent on
880+
syntax enable
879881
exec 'colorscheme '.s:settings.colorscheme
880882
"}}}

0 commit comments

Comments
 (0)