Mercurial > dotfiles.old
changeset 93:8278ded5eb8c
Replace ctrlp and yankring with unite
author | zegervdv <zegervdv@me.com> |
---|---|
date | Thu, 07 Aug 2014 19:11:30 +0200 |
parents | afe2d02577c2 |
children | c31e63aba1dd |
files | .hgsub .hgsubstate vimrc |
diffstat | 3 files changed, 42 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsub Thu Aug 07 08:39:22 2014 +0200 +++ b/.hgsub Thu Aug 07 19:11:30 2014 +0200 @@ -1,5 +1,4 @@ vim/bundle/nerdtree = [git]https://github.com/scrooloose/nerdtree.git -vim/bundle/ctrlp = [git]https://github.com/kien/ctrlp.vim.git vim/bundle/cucumber = [git]https://github.com/tpope/vim-cucumber.git vim/bundle/rails = [git]https://github.com/tpope/vim-rails.git vim/bundle/rspec = [git]https://github.com/thoughtbot/vim-rspec.git @@ -25,14 +24,12 @@ vim/bundle/hybrid = [git]https://github.com/w0ng/vim-hybrid.git vim/bundle/eunuch = [git]https://github.com/tpope/vim-eunuch.git vim/bundle/tagbar = [git]https://github.com/majutsushi/tagbar.git -vim/bundle/ctrlp-cmdpalette = [git]https://github.com/fisadev/vim-ctrlp-cmdpalette.git vim/bundle/a = [git]https://github.com/vim-scripts/a.vim.git vim/bundle/slim = [git]https://github.com/slim-template/vim-slim.git vim/bundle/auto-pairs = [git]https://github.com/jiangmiao/auto-pairs.git vim/bundle/vis = [git]https://github.com/AzizLight/vis.vim.git vim/bundle/gundo = [git]http://github.com/sjl/gundo.vim.git vim/bundle/syntastic = [git]https://github.com/scrooloose/syntastic.git -vim/bundle/yankring = [git]https://github.com/vim-scripts/YankRing.vim.git vim/bundle/neocomplete = [git]https://github.com/Shougo/neocomplete.vim.git vim/bundle/indent-guides = [git]https://github.com/nathanaelkane/vim-indent-guides.git vim/bundle/tomdoc = [git]https://github.com/duwanis/tomdoc.vim.git @@ -57,3 +54,5 @@ vim/bundle/reunions = [git]https://github.com/osyo-manga/vim-reunions vim/bundle/marching = [git]https://github.com/osyo-manga/vim-marching.git vim/bundle/jedi = [git]https://github.com/davidhalter/jedi-vim.git +vim/bundle/unite = [git]https://github.com/Shougo/unite.vim.git +vim/bundle/neomru = [git]https://github.com/Shougo/neomru.vim.git
--- a/.hgsubstate Thu Aug 07 08:39:22 2014 +0200 +++ b/.hgsubstate Thu Aug 07 19:11:30 2014 +0200 @@ -7,8 +7,6 @@ c2f60ca2e57fb65d2230c6fe58e7aba5ab065b2e vim/bundle/auto-pairs 1ce4b842b43a1e744008cbef349341a6645662ee vim/bundle/base16 37096dbdcb84d89b17e6706f3e4e84da3c2a2990 vim/bundle/bundler -b5d3fe66a58a13d2ff8b6391f4387608496a030f vim/bundle/ctrlp -a2ec838f3cb1fc292f9dd0bf46fc966b99db91ac vim/bundle/ctrlp-cmdpalette e1728c91413825baff257fef564c026f8a434186 vim/bundle/cucumber b2951b070b58a9e96d4fbe150a8adbfff3bc0fbf vim/bundle/easy-motion a61cb0c1383e6b20ea69f3ea2527d1e212600a40 vim/bundle/emmet @@ -26,6 +24,7 @@ b09ccb3cfb9ada9ac4338217998f54762d7f0855 vim/bundle/merginal 6ce98ee6315bbab040aa7e3c78f72b883c8dbc23 vim/bundle/misc 26bb5c8ff619366b948c757a18ff7a4d71fbcf14 vim/bundle/neocomplete +f70be81d3e6faab5a0cff17743a5203ad08f62e2 vim/bundle/neomru 292df943a0accf601f1efc0cd405c46dab5a082c vim/bundle/neosnippet 44db7c5dffae13d07f524f47558002fead7bb704 vim/bundle/neosnippet-snippets a47c6caf80510d05b9c022bec354ffea006ef840 vim/bundle/nerdtree @@ -50,10 +49,10 @@ f9ba6df8838be0fcf8fb763459bfac35c5df2e78 vim/bundle/textmanip b82f8804c4987b2534a5411d492d15d6010e98d2 vim/bundle/tlib 7bfdda29120dbab0787c966dd35db025305675e1 vim/bundle/tomdoc +1e2e7ee04bb81a1985771c9bfe2b3ddb3b798f31 vim/bundle/unite 6c7b03a2a0abdfd0dabd26602f8a32955abe0181 vim/bundle/vhdl d8334717a21b31b08f90db210a83f1bcca5a4d87 vim/bundle/vim-session bec7236b996ee25f1b03e2f8a5cf0c8ee531ff9c vim/bundle/vimproc 2c03d82a0e4662adf1e347487d73a9bf4bf6fdac vim/bundle/vimwiki 22fa4e57fa3b0e4c9a83de51717b621fe9ca8cd7 vim/bundle/vis -a884f3a161fa3cd8c996eb53a3d1c68631f60c21 vim/bundle/yankring 1dc48015a65282443bfc1c74279b0bbcc2ba3bf2 vimwiki
--- a/vimrc Thu Aug 07 08:39:22 2014 +0200 +++ b/vimrc Thu Aug 07 19:11:30 2014 +0200 @@ -5,7 +5,7 @@ set laststatus=2 set noshowmode -let g:pathogen_disabled = ['ack'] +let g:pathogen_disabled = ['ack','ctrlp', 'yankring'] execute pathogen#infect() set backspace=2 @@ -402,9 +402,43 @@ let g:airline#extensions#syntastic#enabled = 1 " }}} -" YankRing {{{ -let g:yankring_replace_n_pkey = 'cp' -nnoremap <silent> <leader>y :YRShow<CR> +" Unite {{{ + call unite#filters#matcher_default#use(['matcher_fuzzy']) + call unite#filters#sorter_default#use(['sorter_rank']) + call unite#set_profile('files', 'smartcase', 1) + call unite#custom#source('line,outline', 'matchers', 'matcher_fuzzy') + " sort file results by length + call unite#custom#source('file', 'sorters', 'sorter_length') + call unite#custom#source('file_rec/async', 'sorters', 'sorter_length') + let g:unite_enable_start_insert=0 + let g:unite_source_history_yank_enable=1 + let g:unite_source_rec_max_cache_files=5000 + let g:unite_prompt='ยป ' + if executable('ag') + let g:unite_source_grep_command='ag' + let g:unite_source_grep_default_opts='--nocolor --line-numbers --nogroup -S -C4' + let g:unite_source_grep_recursive_opt='' + elseif executable('ack') + let g:unite_source_grep_command='ack' + let g:unite_source_grep_default_opts='--no-heading --no-color -C4' + let g:unite_source_grep_recursive_opt='' + endif + function! s:unite_settings() + nmap <buffer> Q <plug>(unite_exit) + nmap <buffer> <esc> <plug>(unite_exit) + imap <buffer> <C-j> <Plug>(unite_select_next_line) + imap <buffer> <C-k> <Plug>(unite_select_previous_line) + endfunction + autocmd FileType unite call s:unite_settings() + + nnoremap <silent> <C-m> :<C-u>Unite -auto-preview -buffer-name=recent file_mru<cr> + nnoremap <silent> <SPACE>y :<C-u>Unite -buffer-name=yanks history/yank<cr> + nnoremap <silent> <SPACE>l :<C-u>Unite -start-insert -auto-resize -buffer-name=line line<cr> + nnoremap <silent> <SPACE>b :<C-u>Unite -auto-resize -buffer-name=buffers buffer<cr> + nnoremap <silent> <SPACE>/ :<C-u>Unite -no-quit -buffer-name=search grep:.<cr> + nnoremap <silent> <SPACE>m :<C-u>Unite -auto-resize -buffer-name=mappings mapping<cr> + nnoremap <silent> <SPACE>s :<C-u>Unite -quick-match buffer<cr> + nnoremap <silent> <C-p> :<C-u>Unite -start-insert file_rec/async<CR> " }}} " Nerdtree {{{ map <F2> :NERDTreeToggle<CR> @@ -421,29 +455,6 @@ map <leader>f :call RunAllFeatures()<CR> map <leader>k :call RunCurrentFeature()<CR> " }}} -" Ctrl P - Fuzzy file finder {{{ -noremap <C-p> :CtrlP<CR> -let g:ctrl_map = '<c-p>' -let g:ctrl_cmd = 'CtrlP' - -let g:ctrlp_working_path=0 -nnoremap <C-o> :CtrlPBuffer<CR> - -let g:ctrlp_extensions = ['tag'] - -if executable('ag') - let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' - let g:ctrlp_use_caching = 0 -endif - -let g:ctrlp_custom_ignore = { - \ 'dir': '\v[\/]\.(git|hg|svn)$', - \ 'file': '\v\.(exe|so|dll)$', - \ } - -" ctrl p - Commands -map <leader>p :CtrlPCmdPalette<CR> -" }}} " Markdown {{{ let g:vim_markdown_folding_disabled=1 " }}}