I had a problem recently with Vim.
Saving a 54K python file took a very long time (sometimes close to a minute). I thought this was due to Vim and tried to save the same file to a .sql file.
It saves in a zip.
So, the problem was with .py alone.
I checked vim’s au commands, and found nothing suspicious there too.
Next, I checked the plugins and narrowed down to the plugins I added.
Turned out that the python_fold.vim plugin was the culprit.
It was recomputing the folds in the whole file everytime I saved.
I abandoned the plugin. There’s another similar plugin python_ifold.vim out there but I don’t need an auto-fold plugin for python at the moment.
For the moment, I am happy that .py files save zippily.
