-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just a question about how you guys handle swap files #18
Comments
Well, something that works when vim refuses to give the option to delete the swapfiles and you want to dispose of them, is
|
I HATE the swapfile problem, and eventually went with this solution: " Store temporary files in a central spot
let vimtmp = $HOME . '/.tmp/' . getpid()
silent! call mkdir(vimtmp, "p", 0700)
let &backupdir=vimtmp
let &directory=vimtmp This puts all of vim's tempfile droppings in a single centralized location, e.g. This has worked so well that I'd completely forgotten about the entire problem until I saw this issue. |
That's awesome! Thanks for sharing your solution, I think it will address this issue pretty much perfectly. Even in the event of PID collision seems like the only thing that'd happen is we get the prompt. Not too bad. I'm curious though. If we have the same file name found in two different locations on the filesystem and I edit them both in the same vim (say.... the file Also, wow. Today I learned about vim backups. Well, I wonder if I should use them. On files I care about I check them into git. And on ones I care about even more, I check their |
Update: I tested it and it will basically use its own name-collision resolution system Also, holycrap that's creepy, Github cross-references commit messages across repos. |
You see, my Macbook likes to freeze a lot. It's not enough to warrant me to be really upset (for more than a few minutes when it happens, as it averages once every 2 weeks) but it's enough that it gives me reason to set up a plugin such as this one.
Now what happens when I go and re-open with
vim -S
after my machine dies is that I get a flood of "What should I do with your swap file".How do you guys deal with this? I find that I usually try to mash D, but this is not really ideal for the reason that if I keep pressing D I will eventually start to erase lines from some buffers.
If I don't mash D, say I Recover with R, I am re-presented with the prompt the next time because Vim is just so nice/dumb. Not to mention R will lead me to replace some letter in some buffer with the
r
character.The other obvious reason why mashing D sucks is that I'm just actually choosing to throw away any unsaved buffers.
Honestly this wouldnt be problematic if my goddamned fruit machine will just stop freezing up.
The text was updated successfully, but these errors were encountered: