aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rw-r--r--autoload/replace_operator.vim4
-rw-r--r--plugin/replace_operator.vim9
3 files changed, 6 insertions, 9 deletions
diff --git a/VERSION b/VERSION
index 9084fa2..26aaba0 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.1.0
+1.2.0
diff --git a/autoload/replace_operator.vim b/autoload/replace_operator.vim
index 7d73b5e..96e7c90 100644
--- a/autoload/replace_operator.vim
+++ b/autoload/replace_operator.vim
@@ -19,7 +19,7 @@ function! replace_operator#Operatorfunc(type) abort
" Build normal mode keystrokes to select the operated text in visual mode
if a:type ==# 'line'
- let select = '''[V'']'
+ let select = "'[V']"
elseif a:type ==# 'block'
let select = "`[\<C-V>`]"
else
@@ -44,7 +44,7 @@ function! replace_operator#Operatorfunc(type) abort
endfunction
" Helper function for normal mode map
-function! replace_operator#Map(register) abort
+function! replace_operator#(register) abort
let s:register = a:register
set operatorfunc=replace_operator#Operatorfunc
return 'g@'
diff --git a/plugin/replace_operator.vim b/plugin/replace_operator.vim
index 2fc935c..ea5f3b1 100644
--- a/plugin/replace_operator.vim
+++ b/plugin/replace_operator.vim
@@ -5,16 +5,13 @@
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
-if exists('loaded_replace_operator') || &compatible
- finish
-endif
-if v:version < 700
+if exists('loaded_replace_operator') || &compatible || v:version < 700
finish
endif
let loaded_replace_operator = 1
" Set up mapping
nnoremap <expr> <Plug>(ReplaceOperator)
- \ replace_operator#Map(v:register)
+ \ replace_operator#(v:register)
xnoremap <expr> <Plug>(ReplaceOperator)
- \ replace_operator#Map(v:register)
+ \ replace_operator#(v:register)