" Respect XDG set viminfo+=n$XDG_CACHE_HOME/vim/viminfo set directory=$XDG_CACHE_HOME/vim/swap,/tmp set backupdir=$XDG_CACHE_HOME/vim/backup,/tmp set undodir=$XDG_CACHE_HOME/vim/undo,/tmp set runtimepath=$XDG_CONFIG_HOME/vim,$VIM,$VIMRUNTIME,/usr/share/vim/vimfiles,$XDG_CONFIG_HOME/vim/after " NeoBundle stuff set runtimepath+=$XDG_CONFIG_HOME/vim/bundle/neobundle.vim/ call neobundle#begin(expand('$XDG_CONFIG_HOME/vim/bundle')) NeoBundleFetch 'Shougo/neobundle.vim' NeoBundle 'Shougo/vimproc', { \ 'build' : { \ 'unix' : 'make -f make_unix.mak', \ 'mac' : 'make -f make_mac.mak', \ }, \ } NeoBundle 'Shougo/unite.vim' NeoBundle 'mattn/emmet-vim' NeoBundle 'miekg/rfc' NeoBundle 'tommcdo/vim-exchange' NeoBundle 'tpope/vim-git' NeoBundle 'tpope/vim-fugitive' NeoBundle 'ConradIrwin/vim-bracketed-paste' NeoBundle 'scrooloose/syntastic' NeoBundle 'kien/ctrlp.vim' call neobundle#end() " Colorscheme colorscheme Darkcustomside " Allow backspacing over everything in insert mode set backspace=indent,eol,start syntax on filetype plugin indent on set autoindent set copyindent set number " always show line numbers set ignorecase " Ignore case of normal letters set smartcase " ignore case if search pattern is all lowercase, " case-sensitive otherwise set hlsearch " highlight search terms set incsearch " show search matches as you type set history=1000 set undolevels=1000 set wildmenu " Show tab completion options in a menu set wildignore=*.swp,*.bak,*.pyc,*.o set title " change the terminal's title set visualbell " don't beep set noerrorbells " don't beep set backup " use backup files set undofile " save undo's after file closes set mouse=a " enable mouse in all modes set shortmess+=I " don't show the nag-screen set encoding=utf-8 " oh please, like this needs explanation set showcmd " Show partial command in the last line of the screen set scrolloff=1 " Minimum number of screen lines under/above the cursor set linebreak " Don’t wrap lines in the middle of a word " Use space as a leader map nmap / :nohlsearch " Toggle spell checking nmap s :set spell! cmap w!! w !sudo tee % >/dev/null " Tabs are 4 spaces wide set tabstop=4 set shiftwidth=4 set softtabstop=4 set noexpandtab " Automatically hide buffers instead of requiring bangcommands set hidden " Easier window moving map h map j map k map l vmap gj vmap gk nmap gj nmap gk " Show tabs and end-of-line whitespace set listchars=tab:»·,trail:· set list " Color spaces at end of lines bright red for visibility highlight ExtraWhitespace ctermbg=red guibg=red match ExtraWhitespace /\s\+$/ autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@ p :CtrlPMixed " Installation check. NeoBundleCheck "" Statusline set statusline= set statusline+=[%n] " Buffer number set statusline+=%<\ " Where to truncate set statusline+=%.99f " Relative path to file set statusline+=\ %y " Filetype flag, [c]; [help] set statusline+=%w " Preview window flag, [Preview] set statusline+=%m " Modified flag, [+]; [-] " Show a warning if file is read only, [RO] set statusline+=%#identifier# set statusline+=%r set statusline+=%* " Show syntastic warnings if neobundle#is_sourced('syntastic') set statusline+=%#warningmsg# set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%* endif if neobundle#is_sourced('vim-fugitive') set statusline+=%{fugitive#statusline()} endif " Show a warning if file format isn’t unix set statusline+=%#warningmsg# set statusline+=%{&ff!='unix'?'['.&ff.']':''} set statusline+=%* " Show a warning if file encoding isn’t utf-8 set statusline+=%#warningmsg# set statusline+=%{(&fenc!='utf-8'&&&fenc!='')?'['.&fenc.']':''} set statusline+=%* "" Right side of statusline set statusline+=%= " Left/right separation point set statusline+=%-15.((%l,%c-%v)\ %) " Line, column, percentage. (20,0) set statusline+=%P " Percentage visible set laststatus=2 " Always show statusline set spelllang=en_us