Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " Unite
- let g:unite_source_history_yank_enable=1
- let g:unite_source_file_rec_max_cache_files=0
- call unite#custom#source('file_mru,file_rec,file_rec/async,grepocate',
- \ 'max_candidates', 0)
- call unite#custom#source('file_mru,file_rec,file_rec/async,grepocate',
- \ 'ignore_pattern',
- \ '\%(^\|/\)\.$\|\~$\|\.\%(o\|exe\|dll\|bak\|DS_Store\|zwc\|pyc\|sw[po]\|class\)$'.
- \ '\|\%(^\|/\)\%(\.hg\|\.git\|\.bzr\|\.svn\|\.sass-cache\|bower_components\|node_modules\|.tmp\|tags\%(-.*\)\?\)\%($\|/\)')
- let g:unite_source_rec_async_command='ag --nocolor --nogroup --ignore ".hg" --ignore ".svn" --ignore ".git" --ignore ".bzr" --ignore-dir "bower_components" --hidden -g ""'
- "use ag for search
- if executable('ag')
- let g:unite_source_grep_command = 'ag'
- let g:unite_source_grep_default_opts = '--nogroup --nocolor --column --ignore-dir "bower_components" --ignore-dir ".tmp" --ignore-dir "dist"'
- let g:unite_source_grep_recursive_opt = ''
- endif
- call unite#filters#matcher_default#use(['matcher_fuzzy'])
- nnoremap <leader>t :Unite -no-split -buffer-name=files -start-insert file_rec/async:!<cr>
- nnoremap <leader>f :Unite -no-split -buffer-name=files -start-insert file<cr>
- nnoremap <leader>r :Unite -no-split -buffer-name=mru -start-insert file_mru<cr>
- nnoremap <leader>o :Unite -no-split -buffer-name=outline -start-insert outline<cr>
- nnoremap <leader>y :Unite -no-split -buffer-name=yank history/yank<cr>
- nnoremap <leader>b :Unite -no-split -buffer-name=buffer -start-insert buffer<cr>
- nnoremap <leader>/ :Unite -no-quit -keep-focus grep:.<cr>
- "nnoremap <leader>s :Unite -quick-match buffer<cr>
- " Custom mappings for the unite buffer
- autocmd FileType unite call s:unite_settings()
- function! s:unite_settings()
- " Play nice with supertab
- let b:SuperTabDisabled=1
- " Enable navigation with control-j and control-k in insert mode
- imap <buffer> <C-j> <Plug>(unite_select_next_line)
- imap <buffer> <C-k> <Plug>(unite_select_previous_line)
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement