More Notepad++
A while ago I wrote about Notepad++’s awesome customizable syntax highlighting. Today I learned sometime else to help with my task management: customizable function definitions. Using the function list plug-in, I can get a list of all my incomplete tasks.
The plug-in normally finds the functions in a file based on its language settings. It does this by finding regular expression matches for function declarations (usually just function ) and names ([a-zA-Z][a-zA-Z0-9_]* maybe) My task files don’t have functions, but I can find my imcomplete tasks using ^\t*\[[ \.]\]. (which matches “[ ] ” and “[.] “, preceded by any number of tabs) for the declaration and .* for the name (which matches the rest of the line), I get exactly what I want.
Great idea! Could you please describe how to do that?
To use the function list, you first have to download the plug-in I linked to and install it by putting the dll in Notepad++’s plugin directory. Then from the menu select Plug-ins -> User rules and choose the language you created. Then just fill in the Function Begin expression (I used ^\t*\[[ \.]\].) and the Function Name expression (I used .*). You’ll need to know regular expressions for any of it to make sense, and a quick google search will help you there.
Tyler, thank you so much! Also i use quick text plugin. For example i create tag “tt” for “User Defined” language. And than i can type “tt”, press ctrl+enter and “tt” will be replaced with “[.] ” template for task.
I think function list plugin is very good, but it does not support different types of functions. For example i would like highlight private function in red colour and so on.. sorting by function type..