The .vimrc DotFile contains Vim commands executed upon startup and allows you to tweak the editor's behaviour in a myriad of ways. Here is a minimal collection of some sensible non-default settings.
set nocompatible " don't emulate vanilla vi faithfully, to break its limitations set incsearch " Enable incremental searching by default set showmatch " Highlight the matches of the last search set backspace=2 " allow backspacing over everything in insert mode set autoindent " always set autoindenting on set textwidth=0 " Don't wrap words by default set ts=4 " Change tab spacing to a lower value (default=8) set encoding=utf-8 " you really should be using utf-8 now set termencoding=utf-8 " ditto "set fileencodings=utf-8,latin1 " use utf-8, fall back to latin1 if invalid bytes are found set fileencodings= " don't do any encoding conversion (otherwise munges binary files) syntax on " enable syntax highlighting for many languages set background=dark " better syntax colours for black terminals if exists(":filetype") " newer versions of Vim support more intelligent filetype determination filetype plugin indent on runtime ftplugin/man.vim " to always have :Man available endif
4 pages link to .vimrc: