This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 164347

Summary: Highlight pairs for colon alternate syntax (if, foreach, while)
Product: php Reporter: caesar2k <caesar2k>
Component: EditorAssignee: issues@php <issues>
Status: RESOLVED FIXED    
Severity: blocker CC: jeremyclarke
Priority: P3 Keywords: PLAN
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description caesar2k 2009-05-03 21:33:53 UTC
Add the support to match the pair (like happens with brackets) for the alternate PHP syntax with colons.
if ($i == 0):|

endif;

Leaving the cursor at | would highlight the "endif;" part. Same for foreach: / endforeach, while: / endwhile, else:,
elseif ():, and switch: / endswitch;
Comment 1 jeremyclarke 2009-08-06 20:21:51 UTC
+1 for this idea. IMHO the colon syntax for PHP is a LOT more readable. A } just isnt' as expressive as 'endforeach'. 

If not on the colon then it would be great if the words 'if' and 'endif' could be highlighted in the same way as html
opening and closing tags are handled. 
Comment 2 Tomasz Slota 2010-02-10 08:46:28 UTC
reassigning to default owner
Comment 3 dmakovec 2010-03-16 01:55:25 UTC
+1 for this please.  Colon syntax is far more readable than braces in templates, but not having the ability to jump between begin and end blocks in this format makes it less tempting to use.
Comment 4 Filip Zamboj 2010-09-15 12:28:58 UTC
batch reassigning
Comment 5 Petr Pisl 2011-05-11 12:58:27 UTC
Committed into web-main today. Should be available in the next daily build.
Comment 6 Quality Engineering 2011-05-12 04:36:46 UTC
Integrated into 'main-golden', will be available in build *201105120000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b93edc02b812
User: Petr Pisl <ppisl@netbeans.org>
Log: #164347 - Highlight pairs for colon alternate syntax (if, foreach, while)
#183555 - Syntax highlighting if endif constructs
#187188 - Something similar to "match brackets" for "alternative syntax for control structures"