From b0c43f4da759e644498f31fc4c71941dfa813992 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Tue, 1 Sep 2020 14:17:06 +0200 Subject: [PATCH] Added black --- nvim/init.vim | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index 3bb1eb9..ebba23e 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -39,6 +39,8 @@ Plug 'Lenovsky/nuake' Plug 'junegunn/vim-peekaboo' +Plug 'psf/black', { 'branch': 'stable' } + Plug 'git@gitlab.softwareparadies.de:IDE/swp-vim.git' call plug#end() @@ -148,7 +150,11 @@ nnoremap :Nuake inoremap :Nuake tnoremap :Nuake -augroup cpp_settings +augroup color_column autocmd! - autocmd Filetype cpp set colorcolumn=101 -augroup END + autocmd Filetype cpp,python set colorcolumn=101 +augroup end + +augroup format_black + autocmd BufWritePre *.py execute ':Black' +augroup end