David C. Rankin composed on 2021-11-27 14:35 (UTC-0600):
Check your /etc/vimrc or ~/.vimrc and make sure autoindent is turned off. e.g. look for:
" automatically indent lines (default) " set noautoindent
You can uncomment the "set noautoindent" for vi globally (I do that in my ~/.vimrc). You can also just use the command ': set noai' in vim to turn it off.
I have seen konsole do this with vim active for --- well forever. It drives me nuts, so I turn autoindent off and if I need it, just type ': set ai' to turn it on when editing code.
That is likely the issue if vim is involved, if not -- I have no other guesses.
I finally found installations with a .vimrc to remove (host big41, Mageia 7/TDE 14.0.9 & 8/TDE 14.0.11). Its removal didn't help, and there is no /etc/vim* in either.
To be clear, the editor I always use in mc is mcedit, the internal mc editor. I can't imagine what vim settings would have to do with it.