Skip to content

Instantly share code, notes, and snippets.

@cnaccio
Last active August 29, 2015 14:27
Show Gist options
  • Save cnaccio/5101c71083cd0f377e0d to your computer and use it in GitHub Desktop.
Save cnaccio/5101c71083cd0f377e0d to your computer and use it in GitHub Desktop.
ApexDoc Comment Sublime Snippets
<snippet>
<content>
<![CDATA[
/**
* @author Charles Naccio
* @date ${1:DD}/${2:MM}/20${3:YY}
*
* @group ${4:a group to display this class under, in the menu hierarchy. i.e. "Payment Processing"}
* @group-content ${5:a relative path to a static html file that provides content about the group i.e. "../../ApexDocContent/Accounts.htm"}
*
* @description ${6:one or more lines that provide an overview of the class}
*/]]>
</content>
<tabTrigger>apexdoc:c</tabTrigger>
<description>ApexDoc Class Comment</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content>
<![CDATA[
/*******************************************************************************************************
* @description ${1:one or more lines that provide an overview of the method}
* @param ${2:a description of what the parameter does}
* @param ${3:a description of what the parameter does}
* @return ${4:a description of the return value from the method}
* @example
* ${5:Example code usage. This will be wrapped in tags to preserve whitespace}
*/]]>
</content>
<tabTrigger>apexdoc:m</tabTrigger>
<description>ApexDoc Method Comment</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content>
<![CDATA[
/*******************************************************************************************************
* @description ${1:one or more lines that describe the property}
*/]]>
</content>
<tabTrigger>apexdoc:p</tabTrigger>
<description>ApexDoc Property Comment</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
@cnaccio
Copy link
Author

cnaccio commented Aug 18, 2015

To install these simply paste them into your Sublime user folder; on my machine that's "C:\Users\Charles\AppData\Roaming\Sublime Text 3\Packages\User" optionally you can create an ApexDoc folder within the user folder to group these snippets. For example: "C:\Users\Charles\AppData\Roaming\Sublime Text 3\Packages\User\ApexDoc"

Please note that you'll need to change the author name, or create another placeholder token, and adjust the numbers.

Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment