Friday, April 21, 2017

Re: Swap directory changes when opening files under /media [Fedora]

On Friday, April 21, 2017 at 5:16:17 AM UTC-5, Ian wrote:
> Perfect, thanks. Here's what I get:
>
> --- Auto-Commands ---
> fedora BufReadPre
> /media/* set directory=~/tmp,/var/tmp,/tmp
> Last set from /etc/vimrc
> /run/media/*
> set directory=~/tmp,/var/tmp,/tmp
> Last set from /etc/vimrc
> /mnt/* set directory=~/tmp,/var/tmp,/tmp
> Last set from /etc/vimrc
> ...
>
> This lead me to /etc/vimrc which has a line:
>
> " don't write swapfile on most commonly used directories for NFS mounts or USB sticks
> autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
>
> Which confuses me. The aim appears to be to NOT write swap files but all it does is change the location of swap files. And I do want swap files for my mounts in case of recovery.
>
>

I think the intent is not to block swap files, but rather to prevent swap files being written to removable media, which can degrade the lifetime of said media with limited write cycles before failure.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: