2

Our developers recently updated to the latest version of vim and sense then when they edit files from the network share hosted on a FreeNAS server, they eventually cannot write the file, as the .swp file throws them a read only type of error.

I checked the permissions and they have full access. If I close VIM and delete the .swp file, they can then open the file and save the file again till the issue happens again.

Is this a FreeNAS side effect where it could be holding a file in memory?

Jason
  • 3,931
  • 19
  • 66
  • 107

1 Answers1

2

Your developers could add a line like this to their .vimrc (or _vimrc in Windows):
set directory=c:\temp\,.

:help direcory in Vim shows:

List of directory names for the swap file, separated with commas.
- The swap file will be created in the first directory where this is possible.
- Empty means that no swap file will be used (recovery is impossible!).
- ...

chloesoe
  • 335
  • 2
  • 17
  • 1
    This is definitely a viable workaround, but it would be nice for the swap files to be on the shared drive to prevent multiple people from editing the same file at the same time. If everybody is creating swap files on their local drives they might never realize they overwrote someone else's changes. – chicks Apr 03 '17 at 13:31