sponsor Vim development Vim logo Vim Book Ad

grex : Operate on lines matched to the last search pattern (:g/re/x)

 script karma  Rating 2/5, Downloaded by 1339  Comments, bugs, improvements  Vim wiki

created by
Kana Natsuno
script type
*grex* is a Vim plugin to provide useful commands to operate on lines matched
to the last search pattern.  For example, suppose you edit the following

#950 bugfix: jump behavior
#923 bugfix: vs fold
#930 enhancement: foldlevel adjustment
#927 todo: release
#926 enhancement: performance
#924 enhancement: completion
#931 bugfix: syntax highlighting
#928 enhancement: key mappings

Once you search for a keyword such as "bugfix:", you can yank all lines
matched to the search pattern with |:Grey|.  After executing |:Grey|, you can
put the following text:

#950 bugfix: jump behavior
#923 bugfix: vs fold
#931 bugfix: syntax highlighting

There is another command |:Gred| which deletes matched lines instead.

This plugin also provides functions and operators to do the same processes as
|:Gred| or |:Grey|.  See |grex-functions|, |grex-key-mappings| and
|grex-commands| for the details.

- Vim 7.2 or later

- |operator-user| 0.0.5 or later (vimscript#2692)

Latest version:

Document in HTML format:
install details

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-grex-0.0.1.zip 0.0.1 2009-09-08 7.0 Kana Natsuno Feature enhancements:
- Add |:Gred|, |grex#delete()| and |<Plug>(operator-grex-delete)|.
- Support register designation for |grex-operators|.  |operator-user| 0.0.5 or later is required to use this feature.
- Support register designation for functions |grex-functions|.

Minor improvements:
- Revise the document.

Incompatible changes:
- Rename the plugin as "grex".  The old name "grey" is not proper for further enhancements.
- Rename all commands, functions and key mappings.
vim-grey-0.0.0.zip 0.0.0 2009-09-04 7.0 Kana Natsuno Initial upload
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.