execute pathogen#infect() """ DEFAULT VIM SETTINGS let mapleader=" " syntax on filetype plugin indent on " Set colorscheme when the terminal has 256 color support if &t_Co == 256 colorscheme Benokai endif " Some vim settings set number set relativenumber set hlsearch set list set modeline set background=dark set foldmethod=indent set listchars=trail:·,tab:▸\ ,eol:¬ set scrolloff=1 " Save as sudo cnoremap w!! w !sudo tee > /dev/null % " Switch windows with [direction] noremap j noremap k noremap h noremap l " Never use the arrow keys noremap "" noremap! noremap "" noremap! noremap "" noremap! noremap "" noremap! " Append modeline when pressing ml function! AppendModeline() let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d %set :", \ &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no') let l:modeline = substitute(&commentstring, "%s", l:modeline, "") call append(line("$"), l:modeline) endfunction nnoremap ml :call AppendModeline() """ PLUGIN SPECIFIC SETTINGS " NERDTree: " Open NERDTree when no file is specified autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif " Airline: " On arch linux install the following: " otf-powerline-symbols-git " powerline-fonts-git let g:airline_powerline_fonts = 1 if !exists('g:airline_symbols') let g:airline_symbols = {} endif let g:airline_symbols.space = "\ua0" set laststatus=2 " vim: set ts=8 sw=8 tw=78 noet :