X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=vim%2Fvimrc;h=045e896e613581a9653954eda0a7b680e88f3a94;hb=2b72a60d7667d9aeceaa924fe581b39e4cc1da0f;hp=c6fce6b6a371314ecfbf44676eb4579c006c8bfb;hpb=635558342ee61d1fd037d78340f4d4db6c399355;p=smckown%2Fdotfiles.git diff --git a/vim/vimrc b/vim/vimrc index c6fce6b..045e896 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -23,6 +23,9 @@ call pathogen#helptags() runtime! plugin/sensible.vim nnoremap Y Y +" Update wildmenu from sensible defaults +set wildmode=longest:full,full + " Set the correct font for gvim if has("gui_running") if has("gui_gtk2") @@ -71,10 +74,12 @@ set list set softtabstop=2 shiftwidth=2 expandtab " cinoptions for code formatting -set cinoptions=t0,us,U1,k2s,j1,J1 +set cinoptions=t0,U1,k2s,j1,J1 " File type specific settings. if has("autocmd") + autocmd BufNewFile,BufRead /run/shm/* set nobackup nowritebackup noundofile + \ noswapfile viminfo="" noshelltemp history=0 nomodeline secure autocmd filetype make setlocal sts=0 sw=8 noexpandtab tw=80 fo-=t fo+=j autocmd filetype sh,ld setlocal sts=4 sw=4 tw=80 fo-=t fo+=j autocmd filetype python setlocal sts=4 sw=4 tw=79 fo-=t fo+=j @@ -216,7 +221,7 @@ nnoremap gs :Gstatus nnoremap gd :Gdiff nnoremap gc :Gcommit nnoremap gb :Gblame -nnoremap gl :Glog +nnoremap gl :Git log nnoremap gp :Git push nnoremap gr :Gread nnoremap gw :Gwrite @@ -353,9 +358,12 @@ nnoremap cop :DelimitMateSwitch " Rainbow Parenthesis -- off by default but set toggle nnoremap co( :RainbowParenthesesToggle +" Toggle git gutter +nnoremap cog :GitGutterToggle + " mkbuild tools -nnoremap e :call mkbuild#DmenuOpen('e') -nnoremap x :call mkbuild#SelectXrefs() +nnoremap e :Unite -start-insert -buffer-name=files mkbfiles +nnoremap x :Unite -buffer-name=xrefs xrefs " Turn on doxygen syntax highlighting for C, C++, C# and IDL files. let g:load_doxygen_syntax=1 @@ -410,3 +418,29 @@ endfunction "imap dD =strftime('%Y-%m-%d') "nmap dt "=strftime('%H:%M:%S')p "imap dt =strftime('%H:%M:%S') + +" Unite +let g:unite_source_history_yank_enable = 1 +"call unite#filters#matcher_default#use(['matcher_fuzzy']) +nnoremap uf :Unite -no-split -start-insert -buffer-name=files file_rec +nnoremap uy :Unite -no-split -buffer-name=yank history/yank +nnoremap ub :Unite -no-split -start-insert -buffer-name=buffer buffer +nnoremap uo :Unite -no-split -start-insert -buffer-name=outline outline +nnoremap ul :Unite -no-split -start-insert -buffer-name=lines line +nnoremap uc :Unite -no-split -start-insert -buffer-name=quicklist qf +nnoremap ut :Unite -no-split -start-insert -buffer-name=tags tag +nnoremap : :Unite -start-insert -buffer-name=command history/command +nnoremap / :Unite -start-insert -buffer-name=search history/search + +" Custom mappings for the unite buffer +autocmd FileType unite call s:unite_settings() +function! s:unite_settings() + "setlocal noswapfile undolevels=-1 + " Play nice with supertab + let b:SuperTabDisabled=1 + " Enable navigation with control-j and control-k in insert mode + imap (unite_select_next_line) + imap (unite_select_previous_line) + imap (unite_do_default_action) + nmap (unite_exit) +endfunction