added fixers to vimrc and python files

This commit is contained in:
Stefan Friese 2024-12-19 09:31:41 +01:00
parent 66cf829ee3
commit a8ea2d4b07
2 changed files with 11 additions and 1 deletions

View File

@ -2,7 +2,7 @@
autocmd FileType python map <buffer> <F9> :w<CR>:exec '!python3' shellescape(@%, 1)<CR>
autocmd FileType python imap <buffer> <F9> <esc>:w<CR>:exec '!python3' shellescape(@%, 1)<CR>
set tabstop=4 shiftwidth=4 autoindent smartindent expandtab
set tabstop=4 shiftwidth=4 autoindent smartindent expandtab
setlocal colorcolumn=80
setlocal path=.,**
@ -34,3 +34,7 @@ set include=^\\s*\\(from\\\|import\\)\\s*\\zs\\(\\S\\+\\s\\{-}\\)*\\ze\\($\\\|\
" setlocal includeexpr=PyInclude(v:fname)
setlocal define=^\\s*\\<\\(def\\\|class\\)\\>
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'python': ['black', 'add_blank_lines_for_python_control_statements'],
\}

View File

@ -269,6 +269,12 @@ set completeopt+=longest,menu,menuone,preview,noselect,noinsert
" endif
" endfunction
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\}
let g:ale_fix_on_save = 1
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" undotree