sponsor Vim development Vim logo Vim Book Ad

idutils : Simple interface with GNU id-utils (deprecated)

 script karma  Rating 7/7, Downloaded by 2818  Comments, bugs, improvements  Vim wiki

created by
Hari Krishna Dara
script type
This script has been superceded by vimscript #1062 with many enhancements.

This script provides a simple interface with GNU id-utils.

Summary Of Features:
  Command Line:
      IGInitialize, IDGrep, IDGrepAdd
      g:IGlidcmd, g:IGfiltercmd, g:IGautoCopen
      IDGrep    <keyword>
      IDGrep    [<lid argument> ...] <lid keyword pattern>
      IDGrep    <lid options> [+f <filter arguments> ...]
      IDGrepAdd <keyword>
      IDGrepAdd [<lid options> ...] <lid keyword pattern>
      IDGrepAdd <lid arguments> [+f <filter arguments> ...]
  You can use all the regular quickfix commands to traverse from one hit to
      :h quickfix
  Each time you run IDGrepAdd, the new list of matches are added to the
    existing list. This works the same as 'grepadd' command. If you can't
    use a single filter to get all the matches then this command helps you to
    still work with a single list instead of generating multiple lists.
  Use the g:IGlidcmd, g:IGfiltercmd, g:IGautoCopen global variables to set
    the path to 'lid' command, filter command name/path (defaults to 'grep')
    and if the error list window should automatically be opened (runs
    |:cwindow| at the end).
  You can pass as many filters as you want, each prefixed with +f option.
    The filter arguments are escaped such a way that the arguments are
    passed through the shell, unmodified to the filter.
  - Filter the lines that don't contain src.
      IDGrep main +f src
  - Filter the lines that contain src.
      IDGrep main +f -v src
  - To search for the current word in all the files and filter the results
    not containing \.java in the grepped output. This will potentially
    return all the occurences in the java files only.
      IDGrep <cword> +f \.java
  - If any argument contains spaces, then you need to protect them by
    prefixing them with a backslash.  The following will filter those lines
    that don't contain "ABC XYZ".
      IDGrep <cword> +f ABC\ XYZ

Search_key_words: idutils id-utils gnu id grep gid mkid lid Hari Krishna Dara
install details
Drop the file in your plugin directory or source it from your vimrc.
Requires Vim-6.2 or higher.
Requires genutils (vimscript#197) and multvals (vimscript #171)

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
idutils.vim 1.3 2002-08-28 6.0 Hari Krishna Dara Changed -f option to +f since that is used by lid itself. Removed the debug messages.
idutils.vim 1.1 2002-08-22 6.0 Hari Krishna Dara Improved the command-line syntax. It is now much easier to pass in multiple arguments to both lid and the filter command (grep).
idutils.vim 1.0.2 2001-10-09 6.0 Hari Krishna Dara Minor changes. Lets you define your own "lid" command interface. Fixes an extra message coming up when IDGrep is run.
idutils.vim 1.0.1 2001-10-08 6.0 Hari Krishna Dara 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.