sponsor Vim development Vim logo Vim Book Ad

greplace.vim : Replace a pattern across multiple files interactively

 script karma  Rating 176/84, Downloaded by 3734  Comments, bugs, improvements  Vim wiki

created by
Yegappan Lakshmanan
 
script type
utility
 
description
Overview

The Global Replace plugin allows you to search and replace a pattern across
multiple files and buffers.

To search and replace a pattern in multiple files, you invoke a command
supplied by this plugin with the search pattern. The plugin displays the lines
containing the specified pattern in one or more specified files in a Vim
buffer. You can use the Vim editing commands to make modifications to this
buffer. To incorporate the changes back to the corresponding files, you now
invoke a plugin command. This plugin allows you to make multiple modifications
across several files in a single pass.

This plugin will run only on Vim 7.0 and above.

Refer to the greplace.txt help file for more information (available with the plugin).

The github repository for this plugin is at https://github.com/yegappan/greplace
 
install details
You can use any one of the Vim plugin managers (dein.vim, pathogen, vam,
vim-plug, volt, Vundle, etc.) to install and manage this plugin.

Alternatively, you can also manually download and install the plugin
using the following steps.

1. Download the greplace.zip file from github or from the vim.sourceforge.io
   site.
2. Unzip the files into the $HOME/.vim or the $HOME/vimfiles or the
   $VIM/vimfiles directory.  After this step, you should have the following
   files (the directory structure should be preserved):

plugin/greplace.vim - global replace command definitions
autoload/greplace.vim - autoloaded global replace plugin file
doc/greplace.txt    - documentation (help) file

3. Change to the $HOME/.vim/doc or $HOME/vimfiles/doc or $VIM/vimfiles/doc
   directory, start Vim and run the ":helptags ." command to process the
   help file. Without this step, you cannot jump to the help topics.
4. Restart Vim.

To uninstall the global replace plugin, remove the plugin/greplace.vim,
autoload/greplace.vim and doc/greplace.txt files from the $HOME/.vim or
$HOME/vimfiles directory.
 

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
greplace.zip 2.0 2018-03-04 7.0 Yegappan Lakshmanan 1. Fix various reported bugs with escaping the search pattern, highlighting the changes, etc.
2. Refactor the code.
3. Update the help text.
greplace.zip 1.0b1 2007-03-03 7.0 Yegappan Lakshmanan Initial revision.
ip used for rating: 142.132.191.50

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.
   
Vim at Github