Skip to content

Instantly share code, notes, and snippets.

@peyton
Created January 22, 2011 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peyton/791386 to your computer and use it in GitHub Desktop.
Save peyton/791386 to your computer and use it in GitHub Desktop.
My vim configuration
" Vim configuration - Peyton Randolph
" turn off filetype to get around bug, load pathogen plugins, restart filetype
filetype off
call pathogen#runtime_append_all_bundles()
filetype plugin indent on
" indenting
set smartindent
set autoindent
set smarttab
set ic " ignore case in search
set incsearch " incremental search
set hlsearch " highlight search results
set smartcase "ignore case when lowercase
" fix backspace
set t_kb=
" intuitive backspacing of indents, linebreaks
set backspace=indent,eol,start
fixdel
set scrolloff=2 " minimum number of lines above and below edit cursor
set tabstop=4 " number of columns in a tab
set softtabstop=4 " number of columns to move when tabkey is hit
set shiftwidth=4 " number of characters shifted with << and >>
set expandtab " tabs become spaces
" underscore as word delimiter
set iskeyword-=_
" filename auto completion
set wildmode=longest:full
set wildmenu
" ignore line wraps when navigating
map A gA
map B gB
" don't want comments at the beginning of the line in python
au BufNewFile,BufRead *.py set nocindent
au BufNewFile,BufRead *.py set nosmartindent
au BufNewFile,BufRead *.py set autoindent
" remove trailing whitespace and ^M for source files
au BufWritePre *.* :%s/[ \t\r]\+$//e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment