color slate syntax on set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab so ~/.vim/plugins.vim set splitbelow " Make sure that powerline is always displayed set laststatus=2 " Always start with NERDTree open "autocmd vimenter * NERDTree " Stop NERDTree causing a panic when you use :bd and exiting vim nnoremap \d :bp:bd # " Show/hide NERDTree with Ctrl+T map :NERDTreeToggle autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif " Close a buffer with Ctrl+C map :BD " Save files with Ctrl+S nmap :w imap :wa " Allow arrow keys to wrap lines instead of getting stuck >:( set whichwrap+=<,>,[,] " Always show hidden files in NERDTree let NERDTreeShowHidden=1 " Recommended settings for vim-buftabline set hidden nnoremap :bnext nnoremap :bprev " leave insert mode quickly if ! has('gui_running') set ttimeoutlen=10 augroup FastEscape autocmd! au InsertEnter * set timeoutlen=0 au InsertLeave * set timeoutlen=1000 augroup END endif