RSS Feed


Notepad++ Function List for PHP

Notepad++ Function List for PHP
Posted on Oct 1, 2013 by Stephen Owens
Tutorial and Code category
   [ Return ]

Notepad++ added a function list panel (starting with v6.4.1), which can be customized for any programming language by adding a XML parser node to the functionList.xml file. This is a notepad++ function list parser for PHP.

How to Setup the PHP Function List in Notepad++

Notepad++ comes with a few function list parsers pre-configured. To add support for PHP you will need to open the functionList.xml file which is typically found at %APPDATA%\notepad++\

Under a default install on Windows 7, it is located under

More about the Notepad++ Function List, and how to setup your own custom language function list parser.

At the top of the file find the node <associationMap> then under it add:

  1. <association langID = "1" id="php_function"/>

view RAW source:

Then under the node <parsers> add the following node:

  1. <!--
  2. PHP Function List Parser Node for Notepad++
  4. -->
  5.       <parser id="php_function" displayName="PHP
  6.           <classRange mainExpr="^[\t ]*(((class|interface)[\t
  7.               openSymbole="\{"
  8.               closeSymbole="\}"
  9.               displayMode="node">
  10.               <className>
  11.                   <nameExpr expr="(class[\t ]+|interface[\t
    ]+|trait[\t ]+)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"/>
  12.                   <nameExpr expr="[\t ]+[\w]+"/>
  13.                   <nameExpr expr="[\w]+"/>
  14.               </className>
  15.               <function mainExpr="^[\t ]*(public[\t
    ]+|protected[\t ]+|private[\t ]+)?(static[\t ]+)?function[\s]+&?[\t
  16.                   <functionName>
  17.                       <funcNameExpr
  18.                       <funcNameExpr
  19.                       <funcNameExpr
  20.                   </functionName>
  21.               </function>
  22.           </classRange>
  23.           <function mainExpr="^[\t ]*function[\s]+&?[\t
  24.               displayMode="$className->$functionName">
  25.               <functionName>
  26.                   <nameExpr
  27.                   <nameExpr
  28.               </functionName>
  29.           </function>
  30.       </parser>

view RAW source:

Discussion on the Notepad++ Function List Parser

A discussion on this PHP parser and others can be found on the Source Forge page for Notepad++.

Like what you read? Get updates for free!
comments powered by Disqus