3 ms·
Disabling swap files is smart especially if you edit files directly on a web server using vim. I've found index.php~ and .index.php.swp on a number of web serve
by _wldu 6y ago
Disabling swap files is smart especially if you edit files directly on a web server using vim. I've found index.php~ and .index.php.swp on a number of web servers over the years.
- chrismorgan 6y agoYou can set a few variables to change where these files go: • 'directory' controls where swap files go, toggled by 'swapfile' (default on), filenames like […].swp; ~/.cache/vim/swap// is a good choice. • 'undodir' controls where undo files go, toggled by 'undofile' (default off), filenames […].un~; ~/.cache/vim/undo// is a good choice. • 'backupdir' controls where backup files go, toggled by 'backup' (default off), filename […]~; ~/.cache/vim/backup// is an interesting choice. Arch Linux actually ships a runtime file that sets these paths, creating the directories if they don’t exist: https://github.com/archlinux/svntogit-packages/blob/packages/vim/trunk/archlinux.vim https://github.com/archlinux/svntogit-packages/blob/packages.... (Note that the double trailing slashes are significant and necessary if you’re using a central location for these files. Refer to the help for explanation.)