PSPad Syntax Highlighting
PSPad allows you to define custom syntax definition files for PeopleCode and SQR. It supports COBOL syntax out of the box.
Here are the steps to get it working.
- Copy PeopleCode.INI and SQR.INI to the Syntax folder where PSPad is installed. This might be something like C:\Program Files\PSPad editor\Syntax but it can vary.
- Start PSPad. Settings Menu > Program Settings > System Integration, make sure the Multi User Environment check box is checked. This means settings are stored in a file, PSPad.INI per user.
- Close and restart PSPad so it recognises the changes you've made so far. In PSPad, choose Settings Menu > Highlighters Settings. Scroll to the bottom of the delivered highlighters to the <not assigned> highlighters.
- Change the first <not assigned> highlighter to PeopleCode by scrolling through the User Highlighters on the right side until you find PeopleCode (if you can't find it, close and restart PSPad). Repeat this for the second <not assigned> highlighter but this time choose SQR. Make you press apply here to save your highlighters. This is how it should look:
- While in PSPad, choose Settings Menu > Program Settings and press the Direct Edit button at the bottom of the dialog box. This allows you to directly modify the PSPad.INI file. Scroll down until you find PeopleCode. This will bring up the PeopleCode configuration section. Copy and paste the syntax settings from the code below (replace what's there already). Repeat this for the SQR section. Press OK and then APPLY to apply the changes.
- These settings configure the highlighter colours and other settings. Note that you can do this yourself manually through highlighter settings as well. If you can't see PeopleCode and SQR sections, don't just copy and paste them in! You need to go back and configure your highlighters again as they weren't saved, and make sure you press APPLY this time.
PSPad.INI: PeopleCode Syntax Settings
[PeopleCode] Filter=PeopleCode (.pcode)|.pcode HLTabWidth=4 IndentChar= UnIndentChar= Compilator File= Compilator Param= Compilator LOG= Compilator Run= Compilator Help= Compilator SaveAll=0 Compilator ParsLog= Compilator Capture=0 Compilator HideOutput=0 Compilator DefaultDir= Comment=000080001FFFFFFF010 Identifier=000000001FFFFFFF000 Key=00FF00001FFFFFFF000 Key words 2=00FF00001FFFFFFF000 Key words 3=00FF00001FFFFFFF000 Label=000000FF1FFFFFFF000 Number=008000001FFFFFFF000 Preprocessor=008080001FFFFFFF010 Reserved Word=00FF00001FFFFFFF000 Space=008080001FFFFFFF000 String=000000FF1FFFFFFF000 Symbol=1FFFFFFF1FFFFFFF000 Compilator LogType=0
PSPad.INI SQR Syntax Settings
[SQR] Filter=SQR (*.sqr;*.sqc)|*.sqr;*.sqc HLTabWidth=4 IndentChar= UnIndentChar= Comment=000080001FFFFFFF010 Identifier=000000001FFFFFFF000 Key=00FF00001FFFFFFF000 Key words 2=00FF00001FFFFFFF000 Key words 3=00FF00001FFFFFFF000 Label=000000FF1FFFFFFF000 Number=000000FF1FFFFFFF000 Preprocessor=004000401FFFFFFF010 Reserved Word=000000801FFFFFFF000 Space=008080001FFFFFFF000 String=000000FF1FFFFFFF000 Symbol=1FFFFFFF1FFFFFFF000 Compilator File= Compilator Param= Compilator LOG= Compilator Run= Compilator Help= Compilator SaveAll=0 Compilator ParsLog= Compilator Capture=1 Compilator HideOutput=0 Compilator DefaultDir= Compilator LogType=0
- Open SQR, SQCs and PeopleCode files to confirm that syntax highlighting is working. Note that by default PSPad treats new files as .txt so if you want to use SQR or PeopleCode syntax highlighting, choose View Menu > Change Syntax and click on PeopleCode or SQR.