aboutsummaryrefslogtreecommitdiff
path: root/autoload/replace_operator.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/replace_operator.vim')
-rw-r--r--autoload/replace_operator.vim20
1 files changed, 10 insertions, 10 deletions
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