From 31174951fff9d58913b471770e16ba3029ae2494 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 19 Nov 2019 15:22:20 +0100 Subject: [PATCH] [ADD][VIM] Auto-format Python files on save --- vim/.vim/after/ftplugin/python.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vim/.vim/after/ftplugin/python.vim b/vim/.vim/after/ftplugin/python.vim index 2dddbad..71c6f1d 100644 --- a/vim/.vim/after/ftplugin/python.vim +++ b/vim/.vim/after/ftplugin/python.vim @@ -31,6 +31,10 @@ let b:undo_ftplugin.='|unlet b:ale_python_mypy_ignore_invalid_syntax' let b:ale_python_mypy_auto_pipenv=1 let b:undo_ftplugin.='|unlet b:ale_python_mypy_auto_pipenv' +" Automatically format files when saving them +let b:ale_fix_on_save=1 +let b:undo_ftplugin='|unlet b:ale_lint_on_save' + " Change max length of a line to 88 for this buffer to match black's settings setlocal colorcolumn=88 let b:undo_ftplugin.='|setlocal colorcolumn<'