aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--VERSION2
-rw-r--r--autoload/undofileskip.vim (renamed from autoload/undoskip.vim)4
-rw-r--r--doc/undofileskip.txt (renamed from doc/undoskip.txt)18
-rw-r--r--plugin/undofileskip.vim (renamed from plugin/undoskip.vim)20
5 files changed, 24 insertions, 24 deletions
diff --git a/README.md b/README.md
index f574b05..b8b9211 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-undoskip.vim
-============
+undofileskip.vim
+================
This plugin emulates the `'backupskip'` option's functionality for the
`+persistent_undo` feature, checking buffer file paths against a list of globs,
diff --git a/VERSION b/VERSION
index 17e51c3..0ea3a94 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.1
+0.2.0
diff --git a/autoload/undoskip.vim b/autoload/undofileskip.vim
index 8813ff1..62933d8 100644
--- a/autoload/undoskip.vim
+++ b/autoload/undofileskip.vim
@@ -1,5 +1,5 @@
" Internal function returns a local value for 'undofile'
-function! undoskip#Check(path) abort
+function! undofileskip#Check(path) abort
" If this isn't a normal buffer, don't save undo data
if &buftype !=# ''
@@ -8,7 +8,7 @@ function! undoskip#Check(path) abort
" Get the path from the buffer name; if that path matches any of the
" patterns, don't save undo data
- for glob in g:undoskip
+ for glob in g:undofileskip
if a:path =~# glob2regpat(glob)
return 0
endif
diff --git a/doc/undoskip.txt b/doc/undofileskip.txt
index c0dbbe5..f0d612e 100644
--- a/doc/undoskip.txt
+++ b/doc/undofileskip.txt
@@ -1,27 +1,27 @@
-*undoskip.txt* For Vim version 8.0 Last change: 2020 May 5
+*undofileskip.txt* For Vim version 8.0 Last change: 2020 May 6
-DESCRIPTION *undoskip*
+DESCRIPTION *undofileskip*
This plugin emulates the `'backupskip'` option's functionality for the
|+persistent_undo| feature, checking buffer file paths against a list of
globs, and switching the `'undofile'` option off locally if any of them match.
-REQUIREMENTS *undoskip-requirements*
+REQUIREMENTS *undofileskip-requirements*
This plugin only loads if 'compatible' is not set. If requires both the
|+persistent_undo| feature and the |glob2regpat()| function. The earliest
full release of Vim with both of these was v8.0.
-OPTIONS *undoskip-options*
+OPTIONS *undofileskip-options*
- *g:undoskip*
-Set `g:undoskip` to a list of globs to match against file buffer paths and
+ *g:undofileskip*
+Set `g:undofileskip` to a list of globs to match against file buffer paths and
switch 'undofile' on or off accordingly. Defaults to the same values as
'backupskip' (or tries to).
Some possibly useful values:
>
- let g:undoskip = [
+ let g:undofileskip = [
\ '/tmp/*',
\ '/dev/shm/*',
\ '/usr/tmp/*',
@@ -31,11 +31,11 @@ Some possibly useful values:
\ '*.git/rebase-merge/git-rebase-todo',
\]
<
-AUTHOR *undoskip-author*
+AUTHOR *undofileskip-author*
Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.
-LICENSE *undoskip-license*
+LICENSE *undofileskip-license*
Licensed for distribution under the same terms as Vim itself (see |license|).
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