I’ve had a few requests from people to document how I use the PeopleCodeTools syntax highlighter in Sublime Text. Here’s a quick overview.
Firstly, the source code is freely available on github, for those that would like to contribute to it. And for those unfamiliar with installing this plugin using Sublime Text, all you need to do is first install Package Control, and then install the ‘PeopleCodeTools’ plugin from Package Control.
The plugin should work for PeopleCode methods (in Application Classes), Functions and Event PeopleCode when using ctrl/cmd + r to bring up the Goto Symbol prompt. Here’s an example of searching for Event PeopleCode on a PeopleCode dump:
Here’s another example of searching for method PeopleCode:
The extensions of the PeopleCode files need to end in either .ppl or .pcode.
I’ve also created syntax highlighters for .tracesql files. Although bear in mind that .tracesql files can sometimes generate code with unmatched quotes resulting in messed up syntax highlighting:
For this specific issue I’ve created a tool to tidy up .tracesql files (also available in the plugin). To run the tidy tool, run the “PeopleCode Tools: Tidy PeopleCode Trace” tool from the command palette:
The syntax highlighting should now look okay:
I’ve noticed that the syntax highlighting plugin slows the opening time for very large files (i.e. 50 MB or greater) due to the fact that the plugin uses regular expressions to create scopes. For this reason, I usually open up a PeopleCode dump at the start of my day and peruse it when needed. I’ve also noticed that the tidy command can take up to 60 seconds on 15MB tracesql files, so please be patient.
Also, when searching for text within large files, I’d recommend disabling the ‘Highlight matches’ option when searching large files:
If ‘Highlight matches’ is not disabled, the search will try to instantly match every single character you type. I’m yet to figure out a way to toggle this functionality on and off, so I have to manually de-select it for now.
I’ve also noticed that if you are using the BracketHighlighter plugin, you’ll need to disable it by running ‘BracketHighlighter: Toggle Global Enable’ from the command line. If not, the response times for pretty much anything you do will be quite slow.
That’s all for now. Hope you guys find this plugin useful!
Warning: Missing argument 1 for cwppos_show_review(), called in /var/www/jaymathew.com/wp-content/themes/flat/content-single.php on line 29 and defined in /var/www/jaymathew.com/wp-content/plugins/wp-product-review/includes/legacy.php on line 18