From 9be5150c9f689b954cd269c1aa5fe0957198c96c Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 10 Sep 2015 12:09:56 +0200 Subject: misc Signed-off-by: Florian Pritz --- .vimrc | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 2177af2..186164b 100644 --- a/.vimrc +++ b/.vimrc @@ -69,6 +69,8 @@ Plugin 'scrooloose/syntastic' Plugin 'Valloric/YouCompleteMe' Plugin 'SirVer/ultisnips' Plugin 'honza/vim-snippets' +Plugin 'Shougo/unite.vim' +Plugin 'Shougo/vimproc.vim' Plugin 'tpope/vim-unimpaired' Plugin 'tpope/vim-fugitive' @@ -82,6 +84,8 @@ Plugin 'majutsushi/tagbar' Plugin 'adoy/vim-php-refactoring-toolbox' Plugin 'shawncplus/phpcomplete.vim' +Plugin 'sjl/splice.vim' + call vundle#end() syntax on filetype plugin indent on @@ -126,6 +130,9 @@ nnoremap :w inoremap :q nnoremap :q +noremap :nohl +inoremap :nohla + " fix some keycodes set = set = @@ -164,7 +171,7 @@ let python_highlight_all = 1 " Ultisnips let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsListSnippets="" +let g:UltiSnipsListSnippets="" let g:UltiSnipsUsePythonVersion=2 let g:UltiSnipsEditSplit="vertical" @@ -176,6 +183,32 @@ let g:tagbar_autoclose=1 " syntastic let g:syntastic_check_on_open = 1 +" unite +let g:unite_source_history_yank_enable = 1 +call unite#filters#matcher_default#use(['matcher_fuzzy']) +call unite#filters#sorter_default#use(['sorter_rank']) + +call unite#custom#profile('default', 'context', + \ { 'prompt': '➤ ', + \ 'start_insert' : '1'}) + +function! s:unite_settings() + let b:SuperTabDisabled=1 + inoremap v unite#do_action('right') + inoremap s unite#do_action('below') + inoremap + inoremap + imap (unite_complete) +endfunction + +" Custom mappings for the unite buffer +autocmd FileType unite call s:unite_settings() + +nnoremap w :Unite -buffer-name=files -start-insert file +nnoremap q :Unite -buffer-name=files -start-insert file_rec/async:! +nnoremap y :Unite -buffer-name=yank history/yank +nnoremap b :Unite -buffer-name=buffer buffer + " completion autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags @@ -195,8 +228,13 @@ autocmd FileType python set ts=4 sw=4 softtabstop=4 et " misc autocmd settings autocmd FileType make setlocal noexpandtab autocmd FileType text setlocal textwidth=78 +autocmd FileType plaintex setlocal textwidth=80 autocmd BufRead,BufNewFile PKGBUILD let is_bash=1 | set ft=sh +" move to first line in git commits +autocmd FileType gitcommit autocmd! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0]) + + " colorscheme let g:jellybeans_background_color_256 = 'none' let g:jellybeans_overrides = { -- cgit v1.2.3-24-g4f1b