Skip to content

Instantly share code, notes, and snippets.

@gmcquillan
Created October 15, 2010 17:12
Show Gist options
  • Save gmcquillan/628558 to your computer and use it in GitHub Desktop.
Save gmcquillan/628558 to your computer and use it in GitHub Desktop.
My .vimrc, optimized for python development.
set enc=utf-8
set title
set titlestring=%f%(\ [%M]%)
set nocompatible
set cmdheight=2
" Enhanced command menu ctrl + d to expand dirs
set wildmenu
set wildignore+=*.pyc,.svn,.DS_Store
" jj as mode switch
map! jj <ESC>
" hide the backup and swap files
set backupdir=~/.vim/backups,.,/tmp
set directory=~/.vim/swap,.,/tmp
"set backupskip=... Didn't know what to set this too
syntax on
set background=dark
"set cursorline
"set number
set nonumber
set modeline " Allow file inline modelines
filetype on
filetype plugin indent on
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set ruler
set laststatus=2
" Highlight bad whitespace
highlight BadWhitespace ctermbg=red guibg=red
au BufRead,BufNewFile *.py match BadWhitespace /^\ \+/
au BufRead,BufNewFile *.py match BadWhitespace /\s\+$/
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set matchtime=4
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set nohidden " Hide buffers when they are abandoned
set mouse=a " Enable mouse usage (all modes)
set equalalways
"set foldmethod=indent
"au BufWinLeave * silent mkview
"au BufWinEnter * silent loadview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment