dotfiles/vim/.vim/after/ftplugin/python.vim

18 lines
395 B
VimL

" Tab related stuff
set shiftwidth=4 tabstop=4 softtabstop=4 expandtab autoindent smartindent
" Right-most border
set colorcolumn=80
" setlocal path=.,**
setlocal wildignore=*.pyc
" if name equals main
map \m iif __name__ == "__main__":<Esc>o<Tab>main()<Esc>o<Bs><Bs><Esc>
" Wrap in docstring quotes
map \" {i"""<Return><Esc>}a<Return>"""<Return><Esc>
" new function
map \f idef ():<Esc>bi