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/undo.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/undo.vim')
-rw-r--r-- | vim/config/undo.vim | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/vim/config/undo.vim b/vim/config/undo.vim index c9539665..f85d9d8c 100644 --- a/vim/config/undo.vim +++ b/vim/config/undo.vim @@ -4,23 +4,15 @@ inoremap <C-c> <C-c>u " Keep screeds of undo history set undolevels=2000 -" Keep undo history in a separate file if the feature is available, we're on -" Unix, and not using sudo(8); this goes really well with undo visualization -" plugins like Gundo or Undotree. -if !strlen($SUDO_USER) && has('unix') && has('persistent_undo') +" 'undodir' and 'undofile' settings will be taken care of by the +" auto_undodir.vim plugin if applicable/possible +if has('persistent_undo') - " Keep per-file undo history in ~/.vim/undo; the double-slash at the end - " of the directory prods Vim into keeping the full path to the file in its - " undo filename to avoid collisions; the same thing works for swap files - set undofile - set undodir^=~/.vim/undo// + " Turn off the option by default + set noundofile - " Create the ~/.vim/undo directory if necessary and possible - if !isdirectory($HOME . '/.vim/undo') && exists('*mkdir') - call mkdir($HOME . '/.vim/undo', 'p', 0700) - endif - - " Don't track changes to sensitive files + " Don't keep undo files from temporary directories or shared memory in case + " they're secrets if has('autocmd') augroup dotfiles_undo_skip autocmd! @@ -29,4 +21,5 @@ if !strlen($SUDO_USER) && has('unix') && has('persistent_undo') \ setlocal noundofile augroup END endif + endif |