sponsor Vim development Vim logo Vim Book Ad

Replace operator : R (replace) operator

 script karma  Rating 1/1, Downloaded by 1091  Comments, bugs, improvements  Vim wiki

created by
Rom Grk
 
script type
utility
 
description
Github: https://github.com/romgrk/replace.vim

Replace operator is an additionnal operator, like 'c', 'd' or 'p'.
It operates on a range of text, and accepts a register as input.
Basically, it replaces the text in {motion} or {Visual} with the content of register [x], or 'clipboard' if none provided.

The deleted text is sent to black hole register by default.
You can set the default register by setting:

    let g:replace_register = '_'

When g:replace_register is set to '|', the text is exchanged between
the two register.
 
install details
cd ~/.vim/bundle  && git clone https://github.com/romgrk/replace.vim

Bundle 'romgrk/replace.vim'

NeoBundle 'romgrk/replace.vim'
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
replace.vim.zip 1.0 2015-08-28 7.0 Rom Grk Initial upload
ip used for rating: 142.132.191.50

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github