Development/GNU ID-utils

From The Document Foundation Wiki
Jump to: navigation, search

The GNU ID-utils are a powerful set of utilities to generate and query a database of file names and identifiers, invoke your favourite editor with the resulting set of files, or accomplish any other task with the resultset.

To create an ID database for LibreOffice either invoke the script solenv/bin/create-ids in the build tree's root directory ($SRC_ROOT), or for 3-6 and later master there's also a make id target to accomplish this.

The ID-utils come with an
;;; id-utils.el -- emacs interface to `lid -R grep', a.k.a. `gid'
For how to interface with the vim editor see the Vim editor's GNU ID-utils section. Generally, the editor invoking functionality of ID-utils uses the shell variables VISUAL or EDITOR, EIDARG, EIDLDEL and EIDRDEL, so it should be possible to invoke any capable editor. Citing from the documentation:

   `eid' invokes the editor defined by the environment variable
`VISUAL'.  If `VISUAL' is undefined, it uses the environment variable
`EDITOR' instead.  If `EDITOR' is undefined, it defaults to `vi'.  It
is possible for `eid' to pass the editor an initial search pattern so
that your cursor will immediately alight on the token of interest.
This feature is controlled by the following environment variables:
`EIDARG'
     A printf(3) format string for the editor argument to search for the
     matching token.  For `vi', this should be `+/%s/'.

`EIDLDEL'
     The regular-expression meta-character(s) for delimiting the
     beginning of a word (the ``eid' Left DELimiter').  `eid' inserts
     this in front of the matching token when a word-search is desired.
     For `vi', this should be `\<'.

`EIDRDEL'
     The regular-expression meta-character(s) for delimiting the end of
     a word (the ``eid' Right DELimiter').  `eid' inserts this in end
     of the matching token when a word-search is desired.  For `vi',
     this should be `\>'.