syntax enable " Syntax highlighting set hlsearch " Highlight search items set incsearch " Highlight search items as you type set showmatch " Show matches for parenthesis, etc. set expandtab " Use softtabs set tabstop=2 shiftwidth=2 " Set tab width set background=light " Assume a light background (dark is the other option) " Just to last position set viminfo='100,\"100,:20,%,n~/.viminfo au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif " Intelligent tab completion function! InsertTabWrapper(direction) let col = col('.') - 1 if !col || getline('.')[col - 1] !~ '\k' return "\" elseif "backward" == a:direction return "\" else return "\" endif endfunction inoremap =InsertTabWrapper ("forward") inoremap =InsertTabWrapper ("backward")