Config

Default

The configuration is set in the ~/.vimrc file. On Windows:

C:\Program Files\Vim\_vimrc

My standard configurations:

Note: On Linux, change the backupdir to ~/temp/backup-vim/.

Alternative

To use a different .vimrc file:

gvim -u test_vimrc

Line Numbers

set number

Line Length

From How to use Vim’s textwidth like a pro by Edward Z. Yang:

Add the following to ~/.vimrc to highlight lines which are longer than 80 characters:

augroup vimrc_autocmds
    autocmd BufRead * highlight OverLength ctermbg=darkgrey guibg=#592929
    autocmd BufRead * match OverLength /\%80v.*/
augroup END

Ruler

To display line and column numbers:

set ruler

Version

:version