I noticed my VIM write/save file for a network path is quite slow.

I found out VIM saves files with approximated speed of 20mbps (2.5MB/s). Network is 1Gb/s local area network so I believe the bandwidth is not a problem. Notepad text editor or Notepad++ saves the same file 10 times faster. It does not make difference if I have access via windows share and UNC path (\\server_name) or map it as local drive.

I made all tests with a clean VIM (gvim.exe -u NONE) so I believe this not a plugin issue.

What else can I check to speed up file saving?

  • Welcome to Vi and Vim!
    – filbranden
    Jul 9, 2020 at 16:47
  • 2
    Does the situation improve if you disable swap files with :set noswapfile? If so, you might consider either disabling them unconditionally or setting the 'directory' option to ensure swap files are on local drives and not on a network share...
    – filbranden
    Jul 9, 2020 at 19:57
  • Using no swap change nothing, the speed is still low at saving file.
    – gradzikb
    Jul 10, 2020 at 4:42
  • How are you editing over the network? Over a graphical ssh connection or using the builtin netrw?
    – D. Ben Knoble
    Jul 10, 2020 at 12:11
  • The file is open with gvim by Windows 10 file manager via UNC path or mapped network drive.
    – gradzikb
    Jul 10, 2020 at 13:34

1 Answer 1


I've solved my problem compiling VIM with bigger write buffer size (\src\structs.h).

Default value

#define WRITEBUFSIZE    8192    // size of normal write buffer

My new value

#define WRITEBUFSIZE    8192*1024   // size of normal write buffer

VIM write speed to network drive is similar to Notepad++ now, it's around 300 Mbps in my case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.