What is Sublime Text?
Sublime Text is a sophisticated text editor that is very popular with programmers and available on all major platforms (Windows, macOS, Linux). The editor includes an API for the Python programming language, allowing its functionality to be extended with packages (also known as plugins) implemented by the 3rd-party community.
What is JSDoc?
JSDoc is a tool for generating documentation for JavaScript source code. The programmer embeds specially formatted comments into the code from which JSDoc generates rich documentation in HTML format, available for viewing in any web browser.
What is "Format JSDoc @params"?
The single most useful construct in any programming language is the function, a self-contained unit of functionality: you pass in a set of inputs, actions are performed, and a set of outputs are returned. Using JSDoc, one can document the name, data type and description of each of those inputs (also known as parameters) and outputs (also known as return values) for each function.
Format JSDoc @params is a plugin for the Sublime Text editor that formats the JSDoc @param comments in an easy-to-read fashion. Specifically, if the current selection in the editor represents a set of @param lines, one per line, it will reformat the lines to align the parameter types, names and descriptions. For example, if the selection represents this:
* @param {module:app/model/model~Model} model - The model definition * @param {string} mode - The mode being performed (e.g. "add", "edit") * @param {string} name - The name of the field (e.g. "type") * @param {function} callback - The Node-style callback to invoke with the result * @param {?module:javascript~Error} callback.err - The error object * @param {string} callback.s - The authorization level
the plugin will reformat it into this:
* @param {module:app/model/model~Model} model - The model definition * @param {string} mode - The mode being performed (e.g. "add", "edit") * @param {string} name - The name of the field (e.g. "type") * @param {function} callback - The Node-style callback to invoke with the result * @param {?module:javascript~Error} callback.err - The error object * @param {string} callback.s - The authorization level
In the two months since the plugin was released, it has been installed by over 800 programmers on Windows, macOS and Linux: