set nocompatible " useless flag syntax enable " enable syntax processing filetype indent on " load filetype-specific indent files set tabstop=2 " number of visual spaces per TAB set softtabstop=2 " number of spaces in tab when editing set shiftwidth=2 set expandtab " tabs are spaces set autoindent " copy indentation of previous line set number " show line numbers set showcmd " show command in bottom bar set wildmenu " visual autocomplete for command menu set incsearch " search as characters are entered set hlsearch " hilight mathces set smartcase " ignorecase using \c set autoread " autoread when file is changed from the outside set ruler " always show currrent position set confirm " ask instead of failing set nostartofline " stop certain movements from always going to first char of line set history=700 " how many lines of history VIM has to remember set wildignore=*.o,*~,*.pyc " ignore compiled files set encoding=utf8 " set default encoding set ffs=unix,dos,mac " set unix as the standard file type set backspace=indent,eol,start " default behavior of backspace set pastetoggle= " Use F11 to toggle between paste and nopaste set cmdheight=2 " set the command window height to 2 lines set laststatus=2 " always display the status line set statusline= set statusline +=%1*\ %n\ %* "buffer number set statusline +=%5*%{&ff}%* "file format set statusline +=%3*%y%* "file type set statusline +=%4*\ %<%F%* "full path set statusline +=%2*%m%* "modified flag set statusline +=%1*%=%5l%* "current line set statusline +=%2*/%L%* "total lines set statusline +=%1*%4v\ %* "virtual column number set statusline +=%2*0x%04B\ %* "character under cursor " Hilight whitespace before EO highlight WhitespaceEOL ctermbg=red guibg=red match WhitespaceEOL /\s\+$/ " fast saving nmap w :w! " navigation between tabs nnoremap :tabprevious nnoremap :tabnext