blob: a5c4a9584a0f9a934a510690ba22d1d88d8a0e85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
"
" replace_operator.vim: Replace text selected with a motion with the
" contents of a register in a repeatable way.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
if exists('g:loaded_replace_operator') || &compatible
finish
endif
if v:version < 700
finish
endif
let g:loaded_replace_operator = 1
" Set up mapping
nnoremap <silent> <unique>
\ <Plug>(ReplaceOperator)
\ :<C-U>call replace_operator#MapNormal(v:register)<CR>g@
xnoremap <silent> <unique>
\ <Plug>(ReplaceOperator)
\ :<C-U>call replace_operator#MapVisual(v:register, visualmode())<CR>
|