From 7ae2a5e03a605a5f788ebcd217ba2bdfd9e89bdd Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 12 May 2019 21:37:03 +1200 Subject: Fix a single-space --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b779fc..3b86278 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Becomes: License ------- -Copyright (c) [Tom Ryder][1]. Distributed under the same terms as Vim itself. +Copyright (c) [Tom Ryder][1]. Distributed under the same terms as Vim itself. See `:help license`. [1]: https://sanctum.geek.nz/ -- cgit v1.2.3 From 1627350eb8da7b8a80a11b53145c25a61318064b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 12 May 2019 21:37:44 +1200 Subject: Remove unneeded variable scoping --- autoload/regex_escape.vim | 14 +++++++------- plugin/regex_escape.vim | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/autoload/regex_escape.vim b/autoload/regex_escape.vim index 380f48b..6acff6b 100644 --- a/autoload/regex_escape.vim +++ b/autoload/regex_escape.vim @@ -14,7 +14,7 @@ function! regex_escape#Operatorfunc(type) abort " Save the current value of the unnamed register and the current value of " the 'clipboard' and 'selection' options into a dictionary for restoring " after this is all done - let l:save = { + let save = { \ 'register': @@, \ 'clipboard': &clipboard, \ 'selection': &selection @@ -39,15 +39,15 @@ function! regex_escape#Operatorfunc(type) abort " Determine the regex flavor to use; if one is defined for the buffer, use " that; failing that, if one is defined globally in g:regex_escape_flavor, " use that; failing that, just use 'bre' - let l:flavor = get(b:, 'regex_escape_flavor', + let flavor = get(b:, 'regex_escape_flavor', \ get(g:, 'regex_escape_flavor', 'bre')) " Get the corresponding character class - let l:class = s:classes[l:flavor] + let class = s:classes[flavor] " Perform the substitution on the unnamed register's contents, inserting a " backslash before every instance of any character in that class - let @@ = substitute(@@, l:class, '\\&', 'g') + let @@ = substitute(@@, class, '\\&', 'g') " Paste our substituted changes back in over the top of the previously " selected text, by reselecting it before the paste @@ -55,9 +55,9 @@ function! regex_escape#Operatorfunc(type) abort " Restore contents of the unnamed register and the previous values of the " 'clipboard' and 'selection' options. - let @@ = l:save['register'] - let &clipboard = l:save['clipboard'] - let &selection = l:save['selection'] + let @@ = save['register'] + let &clipboard = save['clipboard'] + let &selection = save['selection'] endfunction diff --git a/plugin/regex_escape.vim b/plugin/regex_escape.vim index fb11932..5a44e51 100644 --- a/plugin/regex_escape.vim +++ b/plugin/regex_escape.vim @@ -9,13 +9,13 @@ " Author: Tom Ryder " License: Same as Vim itself " -if exists('g:loaded_regex_escape') || &compatible +if exists('loaded_regex_escape') || &compatible finish endif if v:version < 700 finish endif -let g:loaded_regex_escape = 1 +let loaded_regex_escape = 1 " Set up mapping nnoremap (RegexEscape) -- cgit v1.2.3 From f718b43f1ff32d84b9f3cb1ba1ee8eb8019bf161 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 12 May 2019 21:38:03 +1200 Subject: Bump VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d917d3e..0ea3a94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.2 +0.2.0 -- cgit v1.2.3