diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2021-07-15 00:51:52 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2021-07-15 00:51:52 +0200 |
commit | b8b7563bd9cf1731cb5dc2e34ed88d5bc1e336c8 (patch) | |
tree | e320dfd772c6688e6c7c10df036c64ae50c57e45 /stow/vim/dot-vim/ftplugin/python | |
parent | 821fe221f0a99cb808ea1f6485ba4fe2acf5b1b3 (diff) | |
download | configs-b8b7563bd9cf1731cb5dc2e34ed88d5bc1e336c8.tar.gz configs-b8b7563bd9cf1731cb5dc2e34ed88d5bc1e336c8.zip |
Morphed repo to stow structure. Added a bunch of configs in the process.
Diffstat (limited to 'stow/vim/dot-vim/ftplugin/python')
-rw-r--r-- | stow/vim/dot-vim/ftplugin/python/python.vim | 34 | ||||
-rw-r--r-- | stow/vim/dot-vim/ftplugin/python/snips/class | 3 | ||||
-rw-r--r-- | stow/vim/dot-vim/ftplugin/python/snips/template | 5 |
3 files changed, 42 insertions, 0 deletions
diff --git a/stow/vim/dot-vim/ftplugin/python/python.vim b/stow/vim/dot-vim/ftplugin/python/python.vim new file mode 100644 index 0000000..358f902 --- /dev/null +++ b/stow/vim/dot-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> diff --git a/stow/vim/dot-vim/ftplugin/python/snips/class b/stow/vim/dot-vim/ftplugin/python/snips/class new file mode 100644 index 0000000..0febf0c --- /dev/null +++ b/stow/vim/dot-vim/ftplugin/python/snips/class @@ -0,0 +1,3 @@ +class <+++>: + def __init__(<++>): + self.<++> = <++> diff --git a/stow/vim/dot-vim/ftplugin/python/snips/template b/stow/vim/dot-vim/ftplugin/python/snips/template new file mode 100644 index 0000000..d10fa4a --- /dev/null +++ b/stow/vim/dot-vim/ftplugin/python/snips/template @@ -0,0 +1,5 @@ +#!/usr/bin/python + +"""<+++>""" + +<++> |