source ~/.vim/vundlerc.vim syntax on filetype plugin indent on set omnifunc=syntaxcomplete#Complete " unset mouse set mouse= " Maintain undo history between sessions if !isdirectory("/tmp/.vim-undo-dir") call mkdir("/tmp/.vim-undo-dir", "", 0700) endif set undodir=/tmp/.vim-undo-dir set undofile " Default tab is 4 spaces set tabstop=4 set softtabstop=4 set shiftwidth=4 set expandtab " Highlight searches set hlsearch set showmatch " Use TAB to switch between buffers noremap :bn noremap :bp " Highlight trailing whitespace (darker red) highlight WhitespaceEOL ctermbg=124* guibg=#ab0d0d match WhitespaceEOL /\s\+\%#\@ :let _s=@/:%s/\s\+$//e:let @/=_s " Language indents and line lengths autocmd FileType py,rst,md set textwidth=79 autocmd FileType html set softtabstop=2 shiftwidth=2 omnifunc=htmlcomplete#CompleteTags autocmd FileType yaml set softtabstop=2 shiftwidth=2 autocmd FileType css set softtabstop=2 shiftwidth=2 omnifunc=csscomplete#CompleteCSS autocmd FileType rust nmap gd (rust-def) autocmd FileType rust nmap gs (rust-def-split) autocmd FileType rust nmap gx (rust-def-vertical) autocmd FileType rust nmap gd (rust-doc) " Toggles on different plugins/modes noremap :ToggleMouse inoremap :ToggleMousea nmap :set nonumber! nmap :NERDTreeToggle set pastetoggle= " Enable vimrc files per project, e.g: ./project/.vimrc set exrc " Disable unsafe commands in project vimrc set secure