diff options
Diffstat (limited to 'stow/vim/.vim/ftplugin/python/python.vim')
-rw-r--r-- | stow/vim/.vim/ftplugin/python/python.vim | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/stow/vim/.vim/ftplugin/python/python.vim b/stow/vim/.vim/ftplugin/python/python.vim new file mode 100644 index 0000000..358f902 --- /dev/null +++ b/stow/vim/.vim/ftplugin/python/python.vim @@ -0,0 +1,34 @@ +" ~/.vim/ftplugin/python/python.vim +" Python-specific vim configuration + +" Tabs are expanded to 4 spaces +setlocal tabstop=4 shiftwidth=4 expandtab +" Show existing tabs (they can be deleted with :retab) +setlocal list + +" Column marker: 90 characters +call matchadd('ColorColumn', '\%91v', 100) +setlocal textwidth=90 + +let b:ale_python_pylint_options = '-d invalid-name' + +" Mappings + +let mapleader = " " + +nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/python/python.vim<CR> +nnoremap <buffer> <leader>x :! ./% +nnoremap <buffer> <leader>X :! ./%<CR> + +nnoremap <buffer> gd :YcmCompleter GoTo<CR> +nnoremap <buffer> gr :YcmCompleter GoToReferences<CR> +nnoremap <buffer> gR :YcmCompleter RefactorRename<Space> +nnoremap <buffer> <leader>gd :YcmCompleter GetDoc<CR> +nnoremap <buffer> <leader>gT :YcmCompleter GetType<CR> + +nnoremap <buffer> <leader>db :!tmux split-window -l '40\%' 'python -m̀ pdb %' + +let mapleader = "," + +inoremap <buffer> <leader>temp <Esc>:-1r ~/.vim/ftplugin/python/snips/template<CR>Gdd?<+++><CR>cf> +inoremap <buffer> <leader>class <Esc>:-1r ~/.vim/ftplugin/python/snips/class<CR>Gdd?<+++><CR>cf> |