Salesforce Reference Plugin for Sublime Text 3
March 7, 2014
The Salesforce developer documentation is of course the source of all wisdom, but it can take a bit of time to leave your development environment, search for what you’re after, and follow the right link. Being able to go straight to the desired location in the documentation from within your dev environment will help prevent you from losing your flow as often happens when you have to spend time searching for solutions – so towards that end, I’ve assembled a plugin for Sublime Text 3 that does just that!
The Salesforce documentation Table of Contents is built using an XML file (at time of writing, http://www.salesforce.com/us/developer/docs/apexcode/Data/Toc.xml). As the plugin sources its data from this xml file, any documentation changes will automatically be accounted for in the plugin, keeping it always up to date.
While the XML file goes right down to individual method signatures, this is too fine-grained for most use cases – a lot of the time I’m looking for a method I’ve forgotten the name of, or I’m looking for a class method to accomplish something in particular – rather than searching for a specific Set Method I know the name of, I’ll do a search for “Set Methods” and scan that page for what I need. So the plugin drills down to just above the lowest level to give you these results.
The Sublime Text plugin then exposes these links to the fuzzy matching Quick Panel that ST3 users will be familiar with.
From here, you simply press enter and a new Salesforce Documentation window will open in your browser at precisely the location selected.
To install this plugin using Package Control, simply run the "Install Package" command and search for "Salesforce Reference".
Alternatively, you can clone the github repository at https://github.com/Oblongmana/sublime-salesforce-reference into your Sublime packages directory (~/Library/Application\ Support/Sublime\ Text\ 3/Packages/ on Mac OSX), though bear in mind you won't receive automatic updates to the plugin if you use this method.
More Info & Contributing
If you'd like to contribute to this plugin, or make any suggestions or bug reports, you can find the repository on github at https://github.com/Oblongmana/sublime-salesforce-reference, or you can ping me on twitter @Oblongmana