Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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"


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.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: