Executing :q! and :wq! (of course :x as well) on any Python files causing "E855: Autocommands caused command to abort". However, :qa , :wqa (and of course :xa as well) don't caused the same error, my guess because they safe all buffers (files) before quitting. But I don't get it because I don't have multiple files opened anyway, just one file, so why :wq! doesn't work ? This screenshot is a sample error from trying to quit using :wq! :
Not many suggestions I could find on E855, but one suggested to disable Python tagbar close in vimrc to make :wq! work :
autocmd BufWinLeave *.py :TagbarClose
I did disable it (line 156 in my vimrc, here's my full settings if necessary) but the problem persists. The only autocommands I have left in my .vimrc are for highlighting, therefore I'm not sure what other autocommands caused the error :
augroup vimrc_autocmds
autocmd!
autocmd FileType python,rst,c,cpp highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python,rst,c,cpp match Excess /\%81v.*/
autocmd FileType python,rst,c,cpp set nowrap
autocmd FileType python,rst,c,cpp set colorcolumn=80
augroup END
I have 2 questions :
- My muscle memory can't seem to let go of
:wq!, is there any modification in vimrc I could do to make:wq!work ? - I'm not familiar with Python yet, why doesn't this error occur with my C++ and C files but only Python ?

:au BufWinLeave:au BufLeave:au BufWritePost:au BufWritePost:au ExitPre(and possibly others as well that I do not remember currently). Did you add any specific such autocommands for python files? Note: those could also be in plugins you are using – Christian Brabandt Dec 29 '21 at 13:00:wqwithout the bang? Re muscle memory: why the bang? Have you consideredZZ? Have you tried Debugging your vimrc? – D. Ben Knoble Dec 29 '21 at 15:15autocmd BufWinLeaveandautocmd BufEnterfor tagbar open and close, but I've disabled them as I mentioned in my post. I don't have any:aucommands in my vimrc. I have autocommands in my Python settings but it's for highlighting (posted above). There's no other autocommands except for the highlighting autocommands I posted above (my full vimrc is also posted). – raisa_ Dec 29 '21 at 23:18:wqas well. (2) Force of habit of supressing warnings (3) Personal preference, unlikeZZ,:wq!will always save even if there's no modification, therefore updating my last edit time which is important for my work. Also, this problem happens withZZas well. (4) I haven't, but now I will start to investigate my plugins. Thank you. – raisa_ Dec 29 '21 at 23:32