Next: Adding support for new languages, Previous: Creating themes, Up: Customizing through XML and Python files
The search dialog contains a number of predefined search patterns for Ada, C and C++. These are generally complex regular expressions, presented in the dialog with a more descriptive name. This includes for instance "Ada assignment", which will match all such assignments.
You can define your own search patterns in the customization files. This is
done through the <vsearch-pattern>
tag. This tag can have a number of
children tags:
<name>
<regexp>
This accepts one optional attribute, named case-sensitive
. This
attribute accepts one of two possible values ("true" or "false") which
indicates whether the search should distinguish lower case and upper
case letters. Its default value is "false".
<string>
<regexp>
and <string>
should be provided. If
both exists, the first <regexp>
child found is used. If there is
none, the first <string>
child is used.
The tag accepts the same optional attribute case-sensitive
as
above
Here is a small example on how the "Ada assignment" pattern was defined.
<?xml version="1.0" ?> <search> <vsearch-pattern> <name>Ada: assignment</name> <regexp case-sensitive="false">\b(\w+)\s*:=</regexp> </vsearch-pattern> </search>