#127 Matching patterns (keyword matching) for NEdit >= 5.5

Program (79)
Uwe Lehnert

This patch is the successor of SourceForge patch #806814
'Matching patterns (keyword matching)'
and is applicable for NEdit >= 5.5.

Short feature description:

'Matching patterns' - in context of the patch - are
defined as
groups of single characters (like '(', ')'), literal
(like '#ifdef', '#endif') or even a regular expression
'\</.*\>', which match to each other.

A matching pattern set is a collection of such matching

'Opposite pattern highlighting' (aka 'flashing') or 'Goto
Matching' feature are adapted by above patch to use
user defineable matching pattern sets i.s.o. a constant

Alternative start / end patterns as well as 'middle'
are allowed (Example 'C preprocessor conditional
Start = '#if' or '#ifndef' or '#ifdef'; middle = '#elif' or
'#else'; end = '#endif').

More info about the 'matching pattern' feature can be found

a.) 'FEATURE.txt' document (included in patch tar ball)
b.) by selecting menu item
'Help' -> 'Features for Programming' ->
'Matching Parentheses' or
'Help' -> 'Customizing' -> 'Matching Patterns'
after patch was applied and NEdit was compiled of
course :-)

File 'mp041114-V3-0.tar.gz' holds version 3.0 of the
patterns (keyword matching) patch.

Version 3.0 of the patch is based on nedit-5.5
(available at ftp://ftp.nedit.org/pub/NEdit/v5_5/).
README.txt (included in patch tar ball) holds hints
about how
to apply the patch.

- Changes since Version 2.1:
* Adaption of this patch to 'Tabbed Editing Interface'.
* New built-in macro subroutine 'get_matching' added.
* Bug fixes: NULL pointer exception corrected, if
menu child widgets were already destroyed.
* C / C++ pattern: #ifdef statement adapted -
whitespaces after '#' are now recognized.
* CSS pattern introduced.
* Sh Ksh Bash pattern: back quotes added.
* XML pattern completely revised.
* NEdit Macro pattern: single quotes & '/* .. */'
comment removed.

Why a new patch ?

Due to i wasn't logged in during creation of patch
#806814 i'm
not able to upload any new versions for this patch by

Because adaption of patch #806814 on NEdit 5.5 need some
changes with regard on the new tabbed document interface i
thought this is maybe a good point in time to create a
patch for this 'keyword matching' feature ...


  • Uwe Lehnert

    Uwe Lehnert - 2004-11-16

    matching pattern V3.0

  • Uwe Lehnert

    Uwe Lehnert - 2005-02-26

    matching pattern V3.1

  • Uwe Lehnert

    Uwe Lehnert - 2005-02-26

    Logged In: YES

    File 'mp050226-V3-1.tar.gz' holds version 3.1 of the
    matching patterns (keyword matching) patch.

    Version 3.1 of the patch is simply an update for
    the latest changes made in CVS of nedit-5.6.
    It is based on the CVS tar ball from 17.02.05
    (available at ftp://ftp.nedit.org/pub/NEdit/snapshot/).

  • Bert Wesarg

    Bert Wesarg - 2007-11-27

    Logged In: YES
    Originator: NO

    the patch do not work with nedit as of CVS 2007/10/04, because of this commit:

    Fix for SF bug #1730611: $match_syntax_based is not set, by Joerg Fischer.

    I uploaded regenerated patch to:


  • Thorsten Haude

    Thorsten Haude - 2008-01-03

    Logged In: YES
    Originator: NO

    File Added: mp050226-V3-1-CVS20071126-3.patch.gz

  • Thorsten Haude

    Thorsten Haude - 2008-01-03

    Bert's new styles as per mailing list

  • Thorsten Haude

    Thorsten Haude - 2008-01-03

    Logged In: YES
    Originator: NO

    File Added: mp.styles

  • Nobody/Anonymous

    It seems the matching doesn't working with the following C code:

    void test(void)
    if () {
    if () {
    // }
    // {

    another problem is when I tried to config the matching patterns (preference->default setting->show matching->matching patterns) I made nedit crashed several times, and I was not able to reproduce them.


Log in to post a comment.