Feature request for Notepad++ Function List plugin
Jun 30, 2010 PHP Coding, Technology, Web Development
As the number of visitors continues to increase to my Notepad++ Function List for PHP development post I have frequently been asked if this plugin can do a certain task. This task would be to add multiple rules to one main category. So for instance you have a file that has multiple classes located in it and each class has its own set of variables and functions. The Function List plugin allows us to parse these out and find them. However, in its current state we can only link one parsing rule to another.
Example:
Current State:
-Classes
–Training model extends Model
—Functions
—-__construct
—-EventListing
-Class Variables
–$Month
–$Day
–$Year
What we would like:
-Classes
–Training model extends Model
—Class Variables
—-$Month
—-$Day
—-$Year
—Functions
—-__construct
—-EventListing
I have sent an email to the creator of the plugin(Jens Lorenz) about asking the possibility of changing the plugin and that correspondence is listed below:
Sent from Me on March 17, 2010 7:57 AM
I have used the Function List plugin for Notepad++ for some time now and really enjoy it. My question to you is if it would be possible to add multiple subgroups under one group? For instance I am a PHP developer; I have parsing rules for Classes, Class Variables and Functions. I would love to be able to put Class Variables along with the Functions rules under the classes tree. So instead of having:
-Classes
–printer extends resources
—Functions
—-__construct
—-sqlInsert
-Class Variables
–$security
–$dbI would have:
-Classes
–printer extends resources
—Class Variables
—-$security
—-$db
—Functions
—-__construct
—-sqlInsertI have put up a blog posting of what my current FunctionListRules.xml section looks like at: http://www.danielkassner.com/2010/01/22/using-notepads-function-list-plugin-for-php-development
If you have any ideas that would be great. Thanks!
Sent by Jens Lorenz on March 18, 2010 at 3:27 AM
Hello Daniel,
currently it isn’t possible. Only one level of subgrouping is possible at the moment.
Best Regards
Jens
Sent by me on March 18, 2010 at 7:41 AM
Do you think that this desired functionality will or could be added to a future release? I am sure that it will take some time to accomplish but it would be nice.
Thank you for the quick response.
I did not get a response back from that last email. I wish that I knew more about C++ to modify and send the changes I would make to him for everyone else to enjoy. I am sure he is a busy man just like me which is why I probably did not get a response back.
If you would like to see this feature potentially get added please contact him via email and or post comment here on this posting. You can find his email by opening Notepad++, selecting the Plugins > Function List > Help menu item.
Tags: Function List, Notepad++
Using Notepad++’s Function List plugin for PHP development
Jan 22, 2010 PHP Coding, Web Development, Work
One thing I really love about Notepad++ is the plugin’s that are available. One of such plugins that I enjoy is the Function List plugin to automatically search my code to pull classes, functions and much more into an easy to see pane on the right side of my screen. I had previously posted tutorials on another site but now I have made the process for “installing” these new rules easier by posting the XML as well as adding more features. Once you have followed the below steps the Function List plugin will show all of the following:
- PHP classes
- PHP class variables – (public, protected and private)
- PHP functions – already does this by default
- CodeIgniter Views
- CodeIgniter Helpers
- CodeIgniter Libraries
- CodeIgniter Models
- PHP include()
- PHP include_once
- PHP require()
- PHP require_once()
Update: I updated the instructions based on a comment below to close Notepad++ while editing the .xml file
Step 1: Close Notepad++
Step 2: Navigate to C:\Program Files\Notepad++\plugins\Config – This is the default installation folder, it may be different on your system.
Step 3: Open the FunctionListRules.xml file in your favorite editor other than Notepad++. The settings may not save if you open this file in Notepad++.
Step 4: Do a search for the following line: (This will more than likely be at the end of the file.)
<Language name="PHP" imagelistpath="">
Step 5: Add the following code between the opening and closing Language tags:
<Group name="Classes" subgroup="Functions" icon="0" child="0" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="\{" keywords=""> <Rules regexbeg="class" regexfunc="[\w_ ]+" regexend="" bodybegin="\{" bodyend="\}" sep="" /> </Group> <Group name="Class Variables" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="public\ " regexfunc="\$.*[^;]" regexend=".*;" bodybegin="" bodyend="" sep="" /> <Rules regexbeg="protected\ " regexfunc="\$.*[^;]" regexend=".*;" bodybegin="" bodyend="" sep="" /> <Rules regexbeg="private\ " regexfunc="\$.*[^;]" regexend=".*;" bodybegin="" bodyend="" sep="" /> </Group> <Group name="Functions" subgroup="" icon="0" child="0" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="\{" keywords=""> <Rules regexbeg="function[\s&]+" regexfunc="[\w_]+" regexend="\s*\(.*\)" bodybegin="\{" bodyend="\}" sep=";" /> </Group> <Group name="CodeIgniter Views" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='\$this->(.*)load->view\(['"]' regexfunc='["\/\w_ ]+' regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="CodeIgniter Helpers" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\$this->(.*)load->helper\(array\(" regexfunc='[',"\w_ ]+' regexend="" bodybegin="" bodyend="" sep="" /> <Rules regexbeg='\$this->(.*)load->helper\(['"]' regexfunc='["\w_]+' regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="CodeIgniter Libraries" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\$this->(.*)load->library\(array\(" regexfunc='[',"\w_ ]+' regexend="" bodybegin="" bodyend="" sep="" /> <Rules regexbeg='\$this->(.*)load->library\(['"]' regexfunc='["\w_]+' regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="CodeIgniter Models" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\$this->(.*)load->model\(array\(" regexfunc='[',"\w_ ]+' regexend="" bodybegin="" bodyend="" sep="" /> <Rules regexbeg='\$this->(.*)load->model\(['"]' regexfunc='["\w_]+' regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="Include" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='include\(['"]' regexfunc="*.*[\w]" regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="Include Once" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='include_once\(['"]' regexfunc="*.*[\w]" regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="Require" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='require\(['"]' regexfunc="*.*[\w]" regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="Require Once" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='require_once\(['"]' regexfunc="*.*[\w]" regexend="" bodybegin="" bodyend="" sep="" /> </Group>
My full section including the Language tags looks like this:
<Language name="PHP" imagelistpath=""> <CommList param1="#" param2="" /> <CommList param1="//" param2="" /> <CommList param1="/\*" param2="\*/" /> <Group name="Classes" subgroup="Functions" icon="0" child="0" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="\{" keywords=""> <Rules regexbeg="class" regexfunc="[\w_ ]+" regexend="" bodybegin="\{" bodyend="\}" sep="" /> </Group> <Group name="Class Variables" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="public\ " regexfunc="\$.*[^;]" regexend=".*;" bodybegin="" bodyend="" sep="" /> <Rules regexbeg="protected\ " regexfunc="\$.*[^;]" regexend=".*;" bodybegin="" bodyend="" sep="" /> <Rules regexbeg="private\ " regexfunc="\$.*[^;]" regexend=".*;" bodybegin="" bodyend="" sep="" /> </Group> <Group name="Functions" subgroup="" icon="0" child="0" autoexp="4" matchcase="1" fendtobbeg="" bbegtobend="\{" keywords=""> <Rules regexbeg="function[\s&]+" regexfunc="[\w_]+" regexend="\s*\(.*\)" bodybegin="\{" bodyend="\}" sep=";" /> </Group> <Group name="CodeIgniter Views" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='\$this->(.*)load->view\(['"]' regexfunc='["\/\w_ ]+' regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="CodeIgniter Helpers" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\$this->(.*)load->helper\(array\(" regexfunc='[',"\w_ ]+' regexend="" bodybegin="" bodyend="" sep="" /> <Rules regexbeg='\$this->(.*)load->helper\(['"]' regexfunc='["\w_]+' regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="CodeIgniter Libraries" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\$this->(.*)load->library\(array\(" regexfunc='[',"\w_ ]+' regexend="" bodybegin="" bodyend="" sep="" /> <Rules regexbeg='\$this->(.*)load->library\(['"]' regexfunc='["\w_]+' regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="CodeIgniter Models" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg="\$this->(.*)load->model\(array\(" regexfunc='[',"\w_ ]+' regexend="" bodybegin="" bodyend="" sep="" /> <Rules regexbeg='\$this->(.*)load->model\(['"]' regexfunc='["\w_]+' regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="Include" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='include\(['"]' regexfunc="*.*[\w]" regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="Include Once" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='include_once\(['"]' regexfunc="*.*[\w]" regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="Require" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='require\(['"]' regexfunc="*.*[\w]" regexend="" bodybegin="" bodyend="" sep="" /> </Group> <Group name="Require Once" subgroup="" icon="0" child="0" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords=""> <Rules regexbeg='require_once\(['"]' regexfunc="*.*[\w]" regexend="" bodybegin="" bodyend="" sep="" /> </Group> </Language>
Step 6: Save and close, then open up a PHP file in Notepad++ to see if it shows the desired output in the Function List tool.
Tags: CodeIgniter, Coding, Function List, Notepad++, PHP, XML
Notepad++ upgrade
Jan 21, 2010 Technology, Web Development, Work
At work my main workstation is a Microsoft Vista box. I do most of my development in Notepad++ and a little bit in PSPad. I had previously been running an older version of Notepad++ (v5.4.5 UNICODE to be exact) and I was upgrading to v5.6.4 UNICODE. Here are a few things to keep in mind when upgrading:
- Windows Vista: Give your user login full permissions to the c:\Program Files\Notepad++ folder. This allows you to make theme changes and other changes in the system and have those changes get saved automatically.
- Open My Computer and navigate to c:\Program Files
- Right click on Notepad++ folder and go to Properties
- Select the Security tab and click the Edit button
- Click Add and search for your name
- Once you have added your name click on it under Group or user names
- Check the Full control allow checkbox and click OK on the remaining properties boxes.
- If you use the Function List plugin make sure you visit here and download the FunctionList20091109_dll.zip file and place this .dll in the plugins folder (c:\Program Files\Notepad++\plugins\). This download is compatible with the Unicode version of Notepad++ 5.5 +.
Tags: Function List, Notepad++, PSPad, Windows Vista
