YAML / YML unwanted auto-formatting
The last days I made some configuration improvements of my vim environment, e.g. I installed vim-polyglot and coc and removed duplicated plugins within my vim-plug plugin manager.
However some very annoying effect occurs which I don't know how to handle, or respectively which plug or setting is responsible for it.
When I start editing for instance the aptitude configuration file config
all the keys get extracted as demonstrated below:
before
Aptitude::UI::Styles { MenuBorder {fg black; bg blue; set bold};
after writing vim formats it this way
aptitude::UI ""; aptitude::UI::Styles ""; aptitude::UI::Styles::MenuBorder ""; aptitude::UI::Styles::MenuBorder::fg "black"; aptitude::UI::Styles::MenuBorder::bg "blue"; aptitude::UI::Styles::MenuBorder::set "bold";
This file is a yaml
/ yml
format.
I appreciate every hint for solving this issue.
:au
to see if you could find the culprit and work your way backwards to the responsible plugin (or other origin)?:au
, but the list is so long. Maybe I have to make a trial and error configuration on a virtual machine. I set up to many plugins at once.BufWritePre
event;:au BufWritePre
should narrow it down. Could also beBufWriteCmd
. Either way: this is definitely some plugin you've added; maybe ALE or something similar? Remove half of your plugins: if that fixes it add half back, and trial-and-error until you've narrowed it down. You can then look at the plugin where you can probably configure this behaviour.aptitutde
config file. However the settings for yaml are very suspicious.