Skip to content

Instantly share code, notes, and snippets.

@pmallory
Created February 24, 2012 19:00
Show Gist options
  • Save pmallory/1902974 to your computer and use it in GitHub Desktop.
Save pmallory/1902974 to your computer and use it in GitHub Desktop.
My .vimrc
"enable syntax highlighting
syntax enable:
"set color scheme
set background=dark
"tab settings
set expandtab
set tabstop=4
set shiftwidth=4
set autoindent
"show line numbers
set number
"folding settings
set foldmethod=indent
set foldnestmax=10
set nofoldenable
set foldlevel=1
"Always have at least five lines above/below insertion point
set scrolloff=5
"make status line pretty
set laststatus=2
set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{&ff}]\ [%c,%l/%L\ (%p%%)]
"make backspace key work
set bs=2
"highlight trailing white space
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment