Notepad++ is a very excellent
programmer editor for Windows. It has plugin system which enhances
it's functionality. Sourcecookifier is a plugin I like very much, it
is a simple plugin which shows the outline of your source code.
The screenshot below shows a pascal
(delphi) source code. We can easily see the structure of the source
code, and we can go to a particular method/function just by one
click.
Sourcecookifier recognizes several
programming languages, but it does not support Clipper language.
Fortunately, it is very easy to add Clipper configure. Follow this
step:
-
Click setting icon (the yellow gear icon) on the sourcecookiefier window.
- Click Language Settings
- Set the file extension setting, add .prg to the extenson box
- On Tag Type choose any letter you like. Here I add “f” for “function” (any letter will be fine)
- On Appearance box, you can write the description, choose Icon etc. It is not too important, I just put [function] in description and leave the other fields as it is.
- Repeat step 5 to step 7 to define additional keyword regexes for static function, procedure, static procedure, create class and method. Here are the regexes:
static function: Input = (^(STAT.*)(FUNC.*)[ \t]*)(([a-zA-Z0-9_]+))
Output = \1
procedure: Input = (^(PROC.*)[ \t]*)(([a-zA-Z0-9_]+))
Output = \1
static procedure: Input = (^(STAT.*)(PROC.*)[ \t]*)(([a-zA-Z0-9_]+))
Output = \1
create class: Input = (^(CREA.*)(CLAS.*)[ \t]*)(([a-zA-Z0-9_]+))
Output = \1
method: Input = (^(METH.*)[ \t]*)(([a-zA-Z0-9_]+))
Output = \1
- The result is like this.
It is not perfect yet, in the example above “METHOD Init(...” scanned as “METHOD Ini”, I still don't know how to resolve.
Comments
Post a Comment