sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

greplace.vim : Replace a pattern across multiple files interactively

 script karma  Rating 158/78, Downloaded by 2749    Comments, bugs, improvements  Vim wiki

created by
Yegappan Lakshmanan
script type

The Global Replace plugin allows you to search and replace a pattern
across multiple files. The lines containing a specified pattern in multiple
files are displayed in a buffer. You can edit the lines in this buffer and
make the desired modifications to them. The plugin can then
incorporate these changes back into the corresponding files interactively.

The Git repository for this plugin is available at http://github.com/yegappan/greplace.

The following commands are provided by this plugin:

:Gsearch         Search for a given pattern in the specified group of
                 files and display the matches in the replace buffer.
:Gbuffersearch   Search for a given pattern in all the buffers
                 in the Vim buffer list.
:Gargsearch      Search for a given pattern in all the files in the
                 Vim argument list.
:Gqfopen         Use the results from the quickfix list.
:Greplace        Incorporate the modifications from the replace buffer
                 into the corresponding files.

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

This plugin will run only on Vim version 7.0 and above.
install details
1. Download the greplace.zip file and unzip the files into the $HOME/.vim
   or the $HOME/vimfiles or the $VIM/vimfiles directory.  After this step, you
   should have the following two files (the directory structure should be

        plugin/greplace.vim - main global replace plugin file
        doc/greplace.txt    - documentation (help) file

2. 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.
3. Restart Vim.

Rating scripts is only available on the HTTPS page

script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
greplace.zip 1.0b1 2007-03-03 7.0 Yegappan Lakshmanan Initial revision.
ip used for rating:

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.
SourceForge.net Logo