Skip to content

Instantly share code, notes, and snippets.

@Arafat245
Last active March 26, 2016 07:39
Show Gist options
  • Save Arafat245/5aeb16adc5d420a32f05 to your computer and use it in GitHub Desktop.
Save Arafat245/5aeb16adc5d420a32f05 to your computer and use it in GitHub Desktop.
" full Python syntax highlighting
let python_highlight_all=1
let g:pyflakes_use_quickfix=1
augroup PYTHON
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
" this one is which you're most likely to use?
autocmd FileType python highlight ColorColumn ctermfg=12, ctermbg=9
autocmd FileType python call matchadd('ColorColumn', '\%80v', 100)
" Display tabs at the beginning of a line in Python mode as bad
au BufRead,BufNewFile *.py,*.pyw match ExtraWhitespace /^\t\+/
" Make trailing whitespace be flagged as bad
" au BufRead,BufNewFile *.py,*.pyw match ExtraWhitespace /\s\+$/
au BufRead,BufNewFile *.py,*.pyw let python_space_errors = 1
" only UNIX line endings.
au BufNewFile *.* set fileformat=unix
let g:syntastic_python_checkers = ['pyflakes']
autocmd BufRead *.py setlocal smartindent cinwords=if,else,elif,for,while,try,except,finally,def,class
augroup end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment