]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
awesome: fix battery_widget
[dotfiles.git] / vim / vimrc
index 9284bf50103126b783d1ce8fd4a3c328c124fcb9..3905add6679e51019a9de68c88649a77f46c7e17 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -26,7 +26,7 @@ Plugin 'wilywampa/python-mode'
 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'
@@ -63,6 +63,7 @@ Plugin 'justinmk/vim-sneak'
 Plugin 'chrisbra/checkattach'
 Plugin 'nathanaelkane/vim-indent-guides'
 Plugin 'alx741/vinfo'
+Plugin 'shougo/vimproc.vim'
 Plugin 'shougo/unite.vim'
 
 " remove entries first
@@ -400,11 +401,6 @@ cnoremap w!! w !sudo tee % > /dev/null
 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
@@ -517,13 +513,27 @@ let g:UltiSnipsListSnippets="<c-e>"
 " unite {{{2
 call unite#filters#matcher_default#use(['matcher_fuzzy'])
 call unite#custom#profile('default', 'context', {
-            \ 'start_insert': 1,
             \ 'winheight': 20,
             \ 'direction': 'botright'
             \ })
-nnoremap    [unite]   <Nop>
-nmap    <leader>u [unite]
-nnoremap <silent> [unite]f :<C-u>Unite buffer file_rec<CR>
+
+" seems not respected
+let g:unite_source_grep_max_candidates = 2000
+if executable('ag')
+    " Use ag in unite rec source
+    let g:unite_source_rec_async_command = 'ag --follow --nocolor --nogroup --hidden -g ""'
+    " 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 -start-insert file_rec/async<CR>
+call unite#custom#default_action('buffer', 'goto')
+nnoremap <silent> [unite]b :<C-u>Unite buffer<CR>
+nnoremap <silent> [unite]a :<C-u>Unite grep -input=\12\17<CR>
 
 " yankring {{{2
 nnoremap <silent> <leader>p :YRShow<cr>