Take the 2-minute tour ×

This is really weird. Everytime I type in the insert mode I hear the sound of disk access. And this is not the case with gedit. My system is ubuntu 10.10. Any idea?

share|improve this question
I wonder if it's updating the .swp file? –  hippietrail Apr 11 '11 at 12:25
I'm not yet convinced it's vim related. It could be a coincidence. You might want to update your question if you are sure it's vim related and state your proofs. –  vtest Apr 11 '11 at 13:16
add comment

2 Answers

up vote 1 down vote accepted

It's probably the swap file. To find the name of the swap file being used for the current Vim buffer, execute


Then, to test whether that file is being modified with every keystroke, you could open another terminal window and execute

$ watch ls -l swapfile

where swapfile is the file name returned by the :swapname command above. Then watch the file's modification time as you type into Vim.

BEGIN EDIT: Having tried the above, I see that ls -l doesn't have sufficient resolution and the default 2-second sample interval of watch is a little long. A better command to see the modification time of your swap file changing is this:

$ watch -n 1 stat -c "%y" swapfile


The time between updates of the swap file is set by the 'updatetime' option, whose value in milliseconds you can determine by executing

:set updatetime?

Unfortunately, that same timer is used to trigger CursorHold autocommands and some plugins set 'updatetime' to around 100 milliseconds to respond quickly after user keystrokes. If you find that 'updatetime' has a value less than its default of 4000, you could execute

:verbose set updatetime?

to find out where it is being set. Then you can decide whether the feature provided by whatever plugin is setting it is worth the annoyance of continual disk accesses.

share|improve this answer
You rock!! I followed your instruction and it was buftabs plug-in that caused the problem. I checked their site and the new fixed version was uploaded yesterday. Nice timing! –  Alice Apr 12 '11 at 13:19
add comment

You probably have your disks setup wrong. Any activity in vim will update the swap file, but this information should not be flushed to disk except periodically. The default disk and vim configuration in 10.10 should not cause this behavior, so you should reconsider any optimizations you made to your system config.

share|improve this answer
add comment

Your Answer


