diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-11 01:07:14 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-11 01:07:14 +1300 |
commit | aaf04871d944646225875d5e9cc31a967947c3fe (patch) | |
tree | 787efb73dabb6b9cda660ccde51e838b507a3dbd /vim/config/backup.vim | |
parent | Merge branch 'hotfix/v0.12.2' (diff) | |
parent | Bump version number to 0.13.0 (diff) | |
download | dotfiles-0.13.0.tar.gz (sig) dotfiles-0.13.0.zip |
Merge branch 'release/v0.13.0'v0.13.0
* release/v0.13.0: (30 commits)
Bump version number to 0.13.0
Move mutt_mail.vim line select logic into plugin
Add new mail_mutt.vim plugin, apply mappings
Sort 'shortmess' flag settings alphabetically
Add 'o' and 'O' back into 'shortmess'
Set up individual flags for 'shortmess'
Fix oii(1df) so it works as a pipe
Use exists+ test rather than exists&
Adjust some whitespace and comment layout
Move matchit.vim sourcing into plugin.vim
Rename netrw.vim to plugin.vim
Remove 'shellslash' setting
Move fedora.vim into os.vim
Remove 'tildeop' setting
Rearrange three smaller files into display.vim
Move 'paste' options into terminal.vim
Move wildmenu config into completion.vim
Rename complete.vim to completion.vim
Rename term.vim to terminal.vim
Rename yank.vim to registers.vim
...
Diffstat (limited to 'vim/config/backup.vim')
-rw-r--r-- | vim/config/backup.vim | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/vim/config/backup.vim b/vim/config/backup.vim index 718647fc..8735a094 100644 --- a/vim/config/backup.vim +++ b/vim/config/backup.vim @@ -1,26 +1,11 @@ -" Use backup features if on a UNIX-like system and not using sudo(8) -if !strlen($SUDO_USER) && has('unix') +" Default to no backup files at all, in a way that even ancient/tiny Vims will +" understand; the auto_backupdir.vim plugin will take care of re-enabling this +set nobackup +set nowritebackup - " Keep backups with a .bak extension in ~/.vim/backup; the double-slash at - " the end of the directory is supposed to prod Vim into keeping the full - " path to the file in its backup filename to avoid collisions, but I don't - " think it actually works for backups, just undo and swap files - set backup - set backupext=.bak - set backupdir^=~/.vim/backup// +" If backps are enabled, use a more explicit and familiar backup suffix +set backupext=.bak - " This option already includes various temporary directories, but we - " append to it so that we don't back up anything in a shared memory - " filesystem either - set backupskip+=*/shm/* - - " Create the backup directory if necessary and possible - if !isdirectory($HOME . '/.vim/backup') && exists('*mkdir') - call mkdir($HOME . '/.vim/backup', 'p', 0700) - endif - -" Don't use backups at all otherwise -else - set nobackup - set nowritebackup -endif +" Don't back up files in anything named */shm/; they might be password +" files +set backupskip+=*/shm/* |