Re:Configuring vim right
by nadim on Monday November 10, 2008 @05:43PM
(#359865)
Thanks for this one:
"Store temporary files in a central spot
Swap files and backups are annoying but can save you a lot of trouble. Rather than spreading them all around your filesystem, isolate them to a single directory"
[ Parent
| on HN ]
set backupdir=~/.vim/backup//
set directory=~/.vim/swp//
If you end your settings with double trailing // then vim will automatically use the full path to the file
so editing
/etc/X11/x.org and ~/x.org won't clobber each other in your swap directory.