I do not really understand why many users want now something in the function list for program source files which are not functions.
However, copy and paste following lines into your wordfile for PHP below last
/TGEnd line and you should see the switch statements with their cases in the function list.
- Code: Select all
/TGBegin "Switches"
/TGFindStr = "%[ ^t]++switch[ ^t]++( ++^(*^))"
/TGBegin "Cases"
/TGFindStr = "[ ^t]+case[ ^t]+^(*^):"
/TGFindBStart = "{"
/TGFindBEnd = "}"
/TGEnd
/TGEnd
The regular expression syntax here is UltraEdit as used for default php.uew.
To edit the correct wordfile, open a PHP file, set cursor inside a PHP section, open
Advanced - Configuration - Editor Display - Syntax Highlighting and you will see the wordfile used to highlight PHP files respectively PHP sections in HTML/XHTML files having just the extension PHP. Click on button
Open to open this wordfile and close the configuration dialog with button
Cancel. After pasting above lines into the wordfile and saving it, set focus the PHP file and if necessary press key F8 (by default assigned to Search - Function List) to update the function list.
BTW: The regular expressions above work also for C/C++, Javascript and similar programming languages with using the UltraEdit regular expression engine for function list in the appropriate wordfile.