diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-06 21:16:56 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-06 21:16:56 +1200 |
commit | 288978a011ce1515431ae58b4759722207a7739c (patch) | |
tree | 2dc9d862d955fb81c9f02dfec11a5c773c14bd45 /plugin | |
parent | Merge branch 'hotfix/v0.1.1' into develop (diff) | |
download | vim-undofileskip-288978a011ce1515431ae58b4759722207a7739c.tar.gz vim-undofileskip-288978a011ce1515431ae58b4759722207a7739c.zip |
Rename plugin
In order to better reflect 'backupskip', the name should be
'undofileskip', not 'undoskip'. After all, the undo feature isn't
removed, only its persistence.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/undofileskip.vim (renamed from plugin/undoskip.vim) | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugin/undoskip.vim b/plugin/undofileskip.vim index 047d9e1..c6b3b1e 100644 --- a/plugin/undoskip.vim +++ b/plugin/undofileskip.vim @@ -1,35 +1,35 @@ " -" undoskip.vim: Don't save undo history for temporary or secure files. +" undofileskip.vim: Don't save undo history for temporary or secure files. " " Author: Tom Ryder <tom@sanctum.geek.nz> " License: Same as Vim itself " -if exists('loaded_undoskip') || &compatible +if exists('loaded_undofileskip') || &compatible finish endif if !has('persistent_undo') || !exists('*glob2regpat') finish endif -let loaded_undoskip = 1 +let loaded_undofileskip = 1 " Set default list of patterns to exclude; mirror documented 'backupskip' " behavior -if !exists('g:undoskip') - let g:undoskip = [] +if !exists('g:undofileskip') + let g:undofileskip = [] if has('mac') - call add(g:undoskip, '/private/tmp/*') + call add(g:undofileskip, '/private/tmp/*') elseif has('unix') - call add(g:undoskip, '/tmp/*') + call add(g:undofileskip, '/tmp/*') endif - call extend(g:undoskip, map( + call extend(g:undofileskip, map( \ filter([$TMPDIR, $TMP, $TEMP], 'v:val !=# '''''), \ 'v:val.''/*''' \)) endif " Check the path on every buffer rename, create, or read -augroup undoskip +augroup undofileskip autocmd! autocmd BufAdd,BufNewFile,BufRead * - \ let &l:undofile = undoskip#Check(expand('<amatch>')) + \ let &l:undofile = undofileskip#Check(expand('<amatch>')) augroup END |