" ##### " # " # File: /usr/local/share/vim/vimrc, $HOME/.vimrc " # Author: Jesper Wallin (jesper@ifconfig.se) " # Date: 22-09-2011 " # " ################### " # VIM default " ################### set nocompatible " ################### " # Fix backspace " ################### set bs=2 " ################### " # Auto-indenting " ################### set ai " ################### " # Hilight searches " ################### set hlsearch " ################### " # Use .viminfo " ################### set viminfo='20,\"500 " ################### " # Command history " ################### set history=50 " ################### " # Show cursor " ################### set ruler " ################### " # Disable modeline " ################### set nomodeline " ################### " # Encode UTF-8 " ################### if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" set fileencodings=utf-8,latin1 endif " ################### " # Don't use Ex mode, use Q for formatting " ################### map Q gq " ################### " # Syntax Highlighting " ################### syntax on " ################### " # Tweaks for xterm " ################### if &term=="xterm" set t_RV= " don't check terminal version set t_Co=8 set t_Sb=^[4%dm set t_Sf=^[3%dm endif " ################### " # Move to last position " ################### au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g'\"" | endif " ################### " # Remove trailing whitespaces on PHP files. " ################### autocmd BufWritePre *.php :%s/\s\+$//e