Skip to content

Instantly share code, notes, and snippets.

@jnovinger
Created December 17, 2011 23:31
Show Gist options
  • Save jnovinger/1491791 to your computer and use it in GitHub Desktop.
Save jnovinger/1491791 to your computer and use it in GitHub Desktop.
Current .vimrc
set number
syntax on
set bg=dark
" from http://www.vex.net/~x/python_and_vim.html
" tab settings for python
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set softtabstop=4
set autoindent
" from http://www.vex.net/~x/python_and_vim.html
" smartindent after keywords
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
" trim trailing whitespace on save
autocmd BufWritePre *.py normal m`:%s/\s\+$//e``
" from http://www.slackorama.com/projects/vim/vimrc.html
" show cursor position
set ruler
" Set status line
set statusline=[%02n]\ %f\ %(\[%M%R%H]%)%=\ %4l,%02c%2V\ %P%*
" Always display a status line at the bottom of the window
set laststatus=2
" show bracket match
set showmatch
" from http://stackoverflow.com/questions/743150/how-to-prevent-vim-from-creating-and-leaving-temporary-files
" swap files, backup files stored in ~/tmp
set swapfile
set dir=~/tmp
set backupdir=~/tmp
" vim-gist
let g:gist_clip_command = 'xclip -selection clipboard'
let g:gist_detext_filetype = 1
let g:gist_open_browser_after_post = 1
let g:gist_browser_command = '/usr/bin/chromium-browser %URL%'
" pylint
autocmd FileType python compiler pylint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment