Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Saving files causes vim to freeze

Tags:

vim

I'm having a problem with saving in vim. When I try to save with :w, it is extremely slow. Generally taking 15-20 seconds to save. During that time, I can't interact with vim at all.

I've tried set nobackup, and it helped a little bit, but it's still slow. The file I'm trying to write is only 526 bytes. I'm able to create files of similar size through other mechanisms, like sending stdout to a file or using a different editor, without any problems. It's just Vim that's super slow.

It started fairly recently. I can't think of any changes that may have cause it. Here's my vimrc file. Anything that could be causing this?

like image 344
ewok Avatar asked Oct 28 '25 18:10

ewok


1 Answers

I suggest running Vim with an empty config:

vim -u NONE

Then see if this behavior is still there. If it is, there may be something wrong with you Vim installation or file system.

If the problem vanishes, comment out all plugins and autocmds and re-enable them one by one. Rinse and repeat until you hit the problem again. You will then have found the setting or plugin causing it.

like image 141
herrbischoff Avatar answered Oct 30 '25 08:10

herrbischoff