# Google Closure Library Snippets Sublime plugin with snippets for the [Google Closure Library](https://developers.google.com/closure/library/) ## Install Install with [Package Control](http://wbond.net/sublime_packages/package_control). Search for: **Google Closure Library Snippets**. ## Getting started Just type `cl` on a javascript document and work with autocomplete. The snippets are namespaced based on functionality, at most you'll have to type 4 chars and `Enter`:
| snippet | Category | Description |
|---|---|---|
| clareach | Arrays | goog.array.forEach() |
| clevlisten | Events | Event listener (goog.event.listen()) |
| clevdispatch | Events | Dispatch an event, verbose version |
| clevcb | Events | Callback function declaration for events, including block docs |
| cldispose | Generic | dispose internal declaration (.disposeInternal = function()) |
| clfn | Generic | Default function declaration with a logger |
| clsingle | Generic | Singleton declaration (goog.addSingletonGetter()) |
| cltypedef | Generic | A very verbose type definition with weird annotation cases |
| clenum | Generic | Enum declaration |
| clprov | Generic | goog.provide(); |
| clreq | Generic | goog.require(); |
| clclassev | New files | New class boilerplate with events inheritance |
| clobjeach | Objects | goog.object.forEach() |