aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rw-r--r--autoload/replace_operator.vim20
-rw-r--r--plugin/replace_operator.vim4
3 files changed, 13 insertions, 13 deletions
diff --git a/VERSION b/VERSION
index 6d7de6e..9084fa2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.2
+1.1.0
diff --git a/autoload/replace_operator.vim b/autoload/replace_operator.vim
index 6b8ce96..7d73b5e 100644
--- a/autoload/replace_operator.vim
+++ b/autoload/replace_operator.vim
@@ -4,7 +4,7 @@ function! replace_operator#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 = {
\ 'unnamed': @@,
\ 'clipboard': &clipboard,
\ 'selection': &selection
@@ -19,27 +19,27 @@ function! replace_operator#Operatorfunc(type) abort
" Build normal mode keystrokes to select the operated text in visual mode
if a:type ==# 'line'
- let l:select = '''[V'']'
+ let select = '''[V'']'
elseif a:type ==# 'block'
- let l:select = "`[\<C-V>`]"
+ let select = "`[\<C-V>`]"
else
- let l:select = '`[v`]'
+ let select = '`[v`]'
endif
" Build normal mode keystrokes to paste from the selected register; only add
" a register prefix if it's not the default unnamed register, because Vim
" before 7.4 gets ""p wrong in visual mode
- let l:paste = 'p'
+ let paste = 'p'
if s:register !=# '"'
- let l:paste = '"'.s:register.l:paste
+ let paste = '"'.s:register.paste
endif
- silent execute 'normal! '.l:select.l:paste
+ silent execute 'normal! '.select.paste
" Restore contents of the unnamed register and the previous values of the
" 'clipboard' and 'selection' options
- let @@ = l:save['unnamed']
- let &clipboard = l:save['clipboard']
- let &selection = l:save['selection']
+ let @@ = save['unnamed']
+ let &clipboard = save['clipboard']
+ let &selection = save['selection']
endfunction
diff --git a/plugin/replace_operator.vim b/plugin/replace_operator.vim
index a8cf835..2fc935c 100644
--- a/plugin/replace_operator.vim
+++ b/plugin/replace_operator.vim
@@ -5,13 +5,13 @@
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
-if exists('g:loaded_replace_operator') || &compatible
+if exists('loaded_replace_operator') || &compatible
finish
endif
if v:version < 700
finish
endif
-let g:loaded_replace_operator = 1
+let loaded_replace_operator = 1
" Set up mapping
nnoremap <expr> <Plug>(ReplaceOperator)