From a4b148f8543451f207e5f0a1716067d09e76d7f1 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sun, 10 Aug 2014 09:25:50 +0200 Subject: [PATCH] vimrc: replace ctrlp with unite --- vimrc | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index dc69f32..deeff27 100644 --- a/vimrc +++ b/vimrc @@ -23,10 +23,13 @@ NeoBundle 'Shougo/vimproc.vim' , { \ }, \ } +NeoBundle 'Shougo/unite.vim' +NeoBundle 'tsukkee/unite-tag' +NeoBundle 'Shougo/neomru.vim' + NeoBundle 'nanotech/jellybeans.vim' NeoBundle 'majutsushi/tagbar' NeoBundle 'bling/vim-airline' -NeoBundle 'kien/ctrlp.vim' NeoBundle 'scrooloose/syntastic' NeoBundle 'tomtom/tcomment_vim' "NeoBundle 'Raimondi/delimitMate' @@ -99,3 +102,29 @@ if &term == "screen" || &term == "screen-bce" set t_fs=\ endif set title + +" unite bindings +if executable('ag') + let g:unite_source_grep_command = 'ag' + let g:unite_source_grep_default_opts = '--noheading --nocolor' +endif +" The prefix key +nnoremap [unite] +nmap [unite] +" General purpose +nnoremap [unite] :Unite -start-insert source +" Files +nnoremap [unite]f :Unite -start-insert file_rec/async +" Grepping +nnoremap [unite]g :Unite grep:. +nnoremap [unite]d :Unite grep:.:-s:\(TODO\|FIXME\) +" Content +nnoremap [unite]o :Unite -start-insert -auto-preview outline +nnoremap [unite]l :Unite -start-insert line +nnoremap [unite]t :Unite -auto-preview -start-insert tag +" Quickly switch between recent things +nnoremap [unite]F :Unite buffer tab file_mru directory_mru +nnoremap [unite]b :Unite buffer +nnoremap [unite]m :Unite file_mru +" Yank history +nnoremap [unite]y :Unite history/yank