Plugin 'kshenoy/vim-signature'
Plugin 'majutsushi/tagbar'
Plugin 'raimondi/delimitmate'
-Plugin 'rking/ag.vim'
+" Plugin 'rking/ag.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/syntastic'
Plugin 'sjl/gundo.vim'
Plugin 'chrisbra/checkattach'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'alx741/vinfo'
+Plugin 'shougo/vimproc.vim'
Plugin 'shougo/unite.vim'
" remove entries first
inoremap <C-C> <Esc>gUiwgi
" plugins options {{{1
-" ag {{{2
-let g:AgSmartCase = 1
-nnoremap <leader>ag yiw:Ag \12"<cr>
-vnoremap <leader>ag y:Ag \12"<cr>
-
" airline {{{2
let g:airline#extensions#whitespace#enabled = 1
let g:airline#extensions#tabline#enabled = 1
\ 'winheight': 20,
\ 'direction': 'botright'
\ })
-nnoremap [unite] <Nop>
-nmap <leader>u [unite]
+
+" seems not respected
+let g:unite_source_grep_max_candidates = 2000
+if executable('ag')
+ " Use ag in unite grep source.
+ let g:unite_source_grep_command = 'ag'
+ let g:unite_source_grep_default_opts = '--smart-case -w --vimgrep --hidden --ignore ''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'''
+ let g:unite_source_grep_recursive_opt = ''
+end
+
+nnoremap [unite] <Nop>
+nmap <leader>u [unite]
nnoremap <silent> [unite]f :<C-u>Unite buffer file_rec<CR>
+nnoremap <silent> [unite]a :<C-u>Unite grep -input=\12\17<CR>
" yankring {{{2
nnoremap <silent> <leader>p :YRShow<cr>