sponsor Vim development Vim logo Vim Book Ad

GVFilter.vim : VIm plugin to filter current buffer by given arguments, like :g or :v

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

created by
Robert Sarkozi
 
script type
utility
 
description
The plugin filters the current buffer so that only lines matching the given arguments remain in the file or all others, non-matching lines.

It is a wrapper for the global/v commands, adding a bit more functionality like being able to repeat the last command executed, or starting a timer to continuously execute the last command.

It makes it easy for the user to assemble the global/v command by defining commands for each and letting the user just enumerate the filter arguments. The executed VIm command is deletion.

General forms of the commands the plugin executes are:

    :g/pattern/d

    :v/pattern/d

'pattern' can be a list of arguments in case more than one argument is passed to the plugin.

:v/arg1\|arg2\|arg3/d

In this case only lines matching arg1 or arg2 or arg3 will be shown in the buffer and all the other lines deleted.

Get the plugin from here on Github: https://github.com/robcsi/gvfilter.vim.git

Other features include:

    - The last command can be repeated by calling a command created specially for that purpose. The plugin remembers the last assembled command

    - The user is also able to continuously filter the current buffer, by using two commands which use VIm's timer mechanisms. The _Start and _Stop commands facilitate this. This is very useful when wanting to filter growing files, like logs.

    - The assembled command can be displayed for the user to see what has been executed.

Check the help file for more information: https://github.com/robcsi/gvfilter.vim/blob/master/doc/gvfilter.txt
Version

0.1.0
Copyright - 2016 - 2017

Robert Sarkozi
 
install details
Install by using pathogen.
 

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
gvfilter.vim.zip 0.1.0 2017-03-18 7.4 Robert Sarkozi Initial upload
ip used for rating: 18.221.85.33

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