summaryrefslogtreecommitdiffstats
path: root/.vimrc
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-09-10 12:09:56 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-09-10 12:12:50 +0200
commit9be5150c9f689b954cd269c1aa5fe0957198c96c (patch)
treef8183d017a0d1c6820b06888e10f0f629b1b2a43 /.vimrc
parent9c4c1b7e5d15b748530f1950e36317661afa1684 (diff)
downloaddotfiles-9be5150c9f689b954cd269c1aa5fe0957198c96c.tar.gz
dotfiles-9be5150c9f689b954cd269c1aa5fe0957198c96c.tar.xz
misc
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc40
1 files changed, 39 insertions, 1 deletions
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 <C-s> :w<cr>
inoremap <C-c> <esc>:q<cr>
nnoremap <C-c> :q<cr>
+noremap <C-h> :nohl<CR>
+inoremap <C-h> <ESC>:nohl<CR>a
+
" fix some keycodes
set <C-Right>=
set <C-Left>=
@@ -164,7 +171,7 @@ let python_highlight_all = 1
" Ultisnips
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsExpandTrigger="<c-j>"
-let g:UltiSnipsListSnippets="<c-e>"
+let g:UltiSnipsListSnippets="<c-l>"
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 <silent> <buffer><expr> <Leader>v unite#do_action('right')
+ inoremap <silent> <buffer><expr> <Leader>s unite#do_action('below')
+ inoremap <silent> <buffer> <c-e> <end>
+ inoremap <silent> <buffer> <c-a> <home>
+ imap <silent> <buffer> <tab> <plug>(unite_complete)
+endfunction
+
+" Custom mappings for the unite buffer
+autocmd FileType unite call s:unite_settings()
+
+nnoremap <leader>w :<C-u>Unite -buffer-name=files -start-insert file<cr>
+nnoremap <leader>q :<C-u>Unite -buffer-name=files -start-insert file_rec/async:!<cr>
+nnoremap <leader>y :<C-u>Unite -buffer-name=yank history/yank<cr>
+nnoremap <leader>b :<C-u>Unite -buffer-name=buffer buffer<cr>
+
" 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 = {