diff --git a/.vim/python.vimrc.vim b/.vim/python.vimrc.vim new file mode 100644 index 0000000..f818d2f --- /dev/null +++ b/.vim/python.vimrc.vim @@ -0,0 +1,28 @@ +" vim-python +augroup vimrc-python + autocmd! + autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=8 colorcolumn=79 + \ formatoptions+=croq softtabstop=4 + \ cinwords=if,elif,else,for,while,try,except,finally,def,class,with +augroup END + +" jedi-vim +let g:jedi#popup_on_dot = 0 +let g:jedi#goto_assignments_command = 'g' +let g:jedi#goto_definitions_command = 'd' +let g:jedi#documentation_command = 'K' +let g:jedi#usages_command = 'n' +let g:jedi#rename_command = 'r' +let g:jedi#show_call_signatures = '0' +let g:jedi#completions_command = '' +let g:jedi#smart_auto_mappings = 0 + +" ale +:call extend(g:ale_linters, { + \'python': ['flake8'], }) + +" vim-airline +let g:airline#extensions#virtualenv#enabled = 1 + +" Syntax highlight +let python_highlight_all = 1 diff --git a/.vim/vimrc b/.vim/vimrc index f6958e8..4237f7a 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -790,34 +790,7 @@ let g:dhall_format=1 """ python -" vim-python -augroup vimrc-python - autocmd! - autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=8 colorcolumn=79 - \ formatoptions+=croq softtabstop=4 - \ cinwords=if,elif,else,for,while,try,except,finally,def,class,with -augroup END - -" jedi-vim -let g:jedi#popup_on_dot = 0 -let g:jedi#goto_assignments_command = 'g' -let g:jedi#goto_definitions_command = 'd' -let g:jedi#documentation_command = 'K' -let g:jedi#usages_command = 'n' -let g:jedi#rename_command = 'r' -let g:jedi#show_call_signatures = '0' -let g:jedi#completions_command = '' -let g:jedi#smart_auto_mappings = 0 - -" ale -:call extend(g:ale_linters, { - \'python': ['flake8'], }) - -" vim-airline -let g:airline#extensions#virtualenv#enabled = 1 - -" Syntax highlight -let python_highlight_all = 1 +exec 'source ' . escape(expand('~/.vim'),' ') . '/' . 'python.vimrc.vim' " partially superseded by jasonccox/vim-wayland-clipboard (for "+) diff --git a/home-leo.nix b/home-leo.nix index 8ec90de..2c63539 100644 --- a/home-leo.nix +++ b/home-leo.nix @@ -64,6 +64,9 @@ in { ".vim/gotags.vimrc.vim" = { source = ./.vim/gotags.vimrc.vim; }; + ".vim/python.vimrc.vim" = { + source = ./.vim/python.vimrc.vim; + }; ".config/helix/config.toml" = { source = ./.config/helix/config.toml;