set nocompatible " Environment http://tlvince.com/vim-respect-xdg if !exists($XDG_CONFIG_HOME) let $XDG_CONFIG_HOME=expand('~/.config') endif if !exists($XDG_DATA_HOME) let $XDG_DATA_HOME=expand('~/.local/share') endif if !exists($XDG_CACHE_HOME) let $XDG_CACHE_HOME=expand('~/.cache') endif set directory=$XDG_CACHE_HOME/vim//,/var/tmp//,/tmp// set backupdir=$XDG_CACHE_HOME/vim,/var/tmp,/tmp set viminfo+=n$XDG_CACHE_HOME/vim/viminfo set rtp=$XDG_CONFIG_HOME/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$XDG_CONFIG_HOME/vim/after " NeoBundle let s:bundle_dir = $XDG_DATA_HOME . '/vim/bundle' let s:neobundle_dir = s:bundle_dir . '/neobundle.vim' let s:neobundle_repo = 'https://github.com/Shougo/neobundle.vim' let s:neobundle_toml = $XDG_CONFIG_HOME . '/vim/neobundle.toml' let s:neobundle_plugrc = $XDG_CONFIG_HOME . '/vim/plugrc' let g:neobundle#cache_file = $XDG_CACHE_HOME . '/vim/neobundlecache' let &runtimepath.=','.s:neobundle_dir try call neobundle#begin(s:bundle_dir) catch /E117/ " neobundle not installed execute "!mkdir -p " . s:neobundle_dir execute "!git clone " s:neobundle_repo . " " . s:neobundle_dir call neobundle#begin(s:bundle_dir) call neobundle#load_toml(s:neobundle_toml, {}) NeoBundleInstall call neobundle#end() quit endtry if neobundle#load_cache(s:neobundle_toml) call neobundle#load_toml(s:neobundle_toml, {}) NeoBundleSaveCache endif if neobundle#tap('unite.vim') nnoremap g :Unite grep \ -auto-preview \ -no-split \ -no-empty nnoremap f :Unite file_mru file/async file_rec/async \ -start-insert nnoremap l :Unite buffer tab \ -no-split nnoremap r :UniteResume \ -no-start-insert \ -force-redraw let neobundle#hooks.on_source = s:neobundle_plugrc . '/unite.rc.vim' call neobundle#untap() endif if neobundle#tap('vimfiler.vim') let g:vimfiler_as_default_explorer = 1 endif if neobundle#tap('ultisnips') let g:UltiSnipsForwardTrigger = "" let g:UltiSnipsBackwardTrigger = "" call neobundle#untap() endif if neobundle#tap('clang_complete') let g:clang_auto_select = 1 let g:clang_snippets = 1 let g:clang_snippets_engine = 'ultisnips' let g:clang_complete_macros = 1 let g:clang_complete_patterns = 1 call neobundle#untap() endif if neobundle#tap('syntastic') let g:syntastic_error_symbol = '✗' let g:syntastic_warning_symbol = '?' call neobundle#untap() endif if neobundle#tap('base16-vim') set bg=dark let base16colorspace=256 function! neobundle#hooks.on_post_source(bundle) colorscheme base16-monokai endfunction call neobundle#untap() endif call neobundle#end() filetype plugin indent on syntax on set ai set bs=2 set cc=80 set fdm=syntax set formatoptions+=j set lcs=tab:\│\ ,trail:·,eol:¬ set ls=2 set nu set rnu set ru set si set sta set sw=4 set ts=4 set ttyfast set wmnu if has('gui_running') set go-=R set go-=T set go-=L endif " Filebin com -range=% Fb :exec ",w !fb -e ".&filetype." -n ".expand("%:t")