sponsor Vim development Vim logo Vim Book Ad

vim-select-replace : replace or delete a word or selection in multiple places

 script karma  Rating 0/0, Downloaded by 31  Comments, bugs, improvements  Vim wiki

created by
Enno Nagel
 
script type
utility
 
description
By this Vim plug-in, you can:

1. Hit c or d followed by *, #, g* or g# to replace respectively delete the current word. Now either:
  A. Press n/N to skip the next occurrence of this word, or
  B. Press . to repeat the previous move and change or deletion.

1. Hit s or x in visual mode to replace respectively delete the selection under the cursor. Now either:
  A. Press n/N to skip the next occurrence of this selection, or
  B. Press . to repeat the previous move and change or deletion.

# Configuration

To change the default mappings, add your modifications of

omap  *  <plug>(vim-select-replace-star)
omap  g* <plug>(vim-select-replace-g-star)
omap  #  <plug>(vim-select-replace-hash)
omap  g# <plug>(vim-select-replace-g-hash)

xmap  s  <plug>(vim-select-replace-s)
xmap  x  <plug>(vim-select-replace-x)

to your vimrc.

# Credits

These ideas to make good use of ":help v_gn" have in essence been divulged by Romain Lafourcade.

# Issues

vim-select-replace is developed at

https://github.com/konfekt/vim-select-replace

where issues can be filed.


 
install details

Unzip vim-select-replace.zip into  ~/.vim on Linux or %USERPROFILE%\vimfiles on Windows.
 

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
vim-select-replace.zip 1.0 2019-04-27 6.0 Enno Nagel Initial upload
ip used for rating: 54.210.158.163

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
OSDN.net Logo