square / maximum-awesome

Config files for vim and tmux.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ignore swap files

kristoferjoseph opened this issue · comments

commented

Do you actually rely on .swp files?
I find that these are a legacy hurdle that don't offer much benefit but do cause a lot of annoyance.
?

set nobackup
set noswapfile
set wildignore=*.swp,*.bak

do ppl not use those anymore? the idea behind a swp file is for small changes that haven't been persisted. So say you machine crashes, you're unsaved changes can still be recovered. Unless there have been improvements to the situation (say OS improvements) I'd vote to keep swap files.

commented

@morenoh149 the issue is having .swp files pooped all over your hard drive and annoying prompts for when you close a file on purpose without saving for a < 1% issue of losing unsaved changes. I save often, use source control and you can even add an autosave option to vim. There is absolutely no reason to have .swp files anymore.

+1 for this

There is absolutely no reason to have .swp files anymore.

I disagree. swp files do have a purpose and I don't think it's right to disable them by default. If you're annoyed by them 💩 ing on your machine, I suggest you set the suggested options in your ~/.vimrc.local.