Skip to content

Instantly share code, notes, and snippets.

@voyeg3r
Created January 22, 2017 11:30
Show Gist options
  • Save voyeg3r/d1443bda0c1d3b6116c111dc0447f15f to your computer and use it in GitHub Desktop.
Save voyeg3r/d1443bda0c1d3b6116c111dc0447f15f to your computer and use it in GitHub Desktop.
"" autocomands for python
augroup python
au FileType python set keywordprg=pydoc
au! BufRead *.py setlocal smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
au! BufRead,Bufnewfile *.py im :<CR> :<CR><TAB>
au! BufNewFile *.py 0r ~/.vim/skel/template.py
au BufNewFile *.py exe "1," . 10 . "s/Creation Date:.*/Creation Date: " .strftime("%d-%m-%Y")
au! BufWritePost *.py :silent !chmod a+x <afile>
autocmd FileType python set textwidth=79
autocmd FileType python filetype indent on
let python_highlight_all=1
let python_highlight_builtins=0
let python_highlight_builtins=1
let python_highlight_exceptions=1
let python_highlight_numbers=1
let python_highlight_space_errors=1
augroup end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment