+" unite {{{2
+call unite#filters#matcher_default#use(['matcher_fuzzy'])
+call unite#custom#profile('default', 'context', {
+ \ 'winheight': 20,
+ \ 'direction': 'botright'
+ \ })
+
+" 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>
+