feat(SublimeText2.WebPackages): cache packages

This commit is contained in:
Iristyle
2013-04-04 08:54:25 -04:00
parent 590d7a44f9
commit 1e6f643a1b
1026 changed files with 79077 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
[
{"command": "move_to", "args": {"to": "bol"}},
{"command": "insert_snippet", "args": {
"contents": "${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}\n"
}},
{"command": "move", "args": {"by": "lines", "forward": false}}
]

View File

@@ -0,0 +1,6 @@
[
{"command": "move_to", "args": {"to": "hardeol"}},
{"command": "insert_snippet", "args": {
"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"
}}
]

View File

@@ -0,0 +1,94 @@
{
// If true, when in a docblock, pressing tab after a @tag line (like @param, @return)
// will indent to the description. This is useful if you are writing a long description
// and want that block of text to stay aligned.
"jsdocs_deep_indent": true,
// If true, then pressing enter while in a double-slash comment (like this one)
// will automatically add two slashes to the next line as well
"jsdocs_extend_double_slash": true,
// the number of spaces to add after the leading *
"jsdocs_indentation_spaces": 1,
// The number of spaces to add after the leading * in lines under the first line of each
// paragraph. This is only used together with automatic line wrapping. For example, a value
// of 3 might look like this:
//
// /**
// * Duis sed arcu non tellus eleifend ullamcorper quis non erat. Curabitur
// * metus elit, ultrices et tristique a, blandit at justo.
// * @param {String} foo Lorem ipsum dolor sit amet.
// * @param {Number} bar Nullam fringilla feugiat pretium. Quisque
// * consectetur, risus eu pellentesque tincidunt, nulla ipsum imperdiet
// * massa, sit amet adipiscing dolor.
// * @return {[Type]}
// */
"jsdocs_indentation_spaces_same_para": 1,
// whether the words following the @tags should align.
// Possible values are 'no', 'shallow', 'deep'
// For backwards compatibility, false is equivalent to 'no', true is equivalent to 'shallow'
//
// 'shallow' will just align the first words after the tag. eg:
// @param {MyCustomClass} myVariable desc1
// @return {String} foo desc2
// @property {Number} blahblah desc3
//
// 'deep' will align each component of the tags, eg:
// @param {MyCustomClass} myVariable desc1
// @return {String} foo desc2
// @property {Number} blahblah desc3
"jsdocs_align_tags": "deep",
// Any additional boilerplate tags which should be added to each block. Should be an array of strings.
// Note that this only applies when a docblock is opened directly preceding a function.
// Tab points can be added by using snippet syntax, eg: ${1:default text}
"jsdocs_extra_tags": [],
// A map to determine the value of variables, should hungarian notation (or similar) be in use
"jsdocs_notation_map": [],
// Since there seems to be no agreed standard for "@return" or "@returns", use this setting to rename it as you wish.
"jsdocs_return_tag": "@return",
// Add a '[description]' placeholder for the return tag?
"jsdocs_return_description": true,
// Add a '[description]' placeholder for the param tag?
"jsdocs_param_description": true,
// Whether there should be blank lines added between the description line, and between tags of different types.
// If true, the output might look like this:
//
// /**
// * [description]
// *
// * @param {String} foo
// * @param {Number} bar
// *
// * @return {[Type]}
// */
"jsdocs_spacer_between_sections": false,
// Whether each section should be indented to the same level, or indent each one individually.
// (When true, the @param section will lose the extra space immediately after each '@param').
"jsdocs_per_section_indent": false,
// Minimum spaces between cols (default is 1). For example, a value
// of 2 might look like this:
//
// /**
// * Duis sed arcu non tellus eleifend ullamcorper quis non erat. Curabitur
// *
// * @param {String} foo Lorem ipsum dolor sit amet.
// * @param {Number} bar Nullam fringilla feugiat pretium. Quisque
// *
// * @return {[Type]} description
// */
"jsdocs_min_spaces_between_columns": 1,
// indicates whether the @method tag should be added automatically
"jsdocs_autoadd_method_tag": false
}

View File

@@ -0,0 +1,7 @@
[
{ "keys": ["alt+shift+tab"], "command": "jsdocs_reparse", "context":
[
{ "key": "selector", "operator": "equal", "operand": "comment.block" }
]
}
]

View File

@@ -0,0 +1,36 @@
[
{ "keys": ["super+j"], "command": "jsdocs_join", "context":
[
{ "key": "selector", "operator": "equal", "operand": "comment.block" }
]
},
{ "keys": ["super+j"], "command": "jsdocs_join", "context":
[
{ "key": "selector", "operator": "equal", "operand": "comment.line" }
]
},
{ "keys": ["super+alt+q"], "command": "jsdocs_wrap_lines",
"context": [
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }
]
},
// add line after, in a DocBlock
{ "keys": ["super+enter"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/Add DocBlockr Line.sublime-macro"},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
]
},
// add line before, in a DocBlock
{ "keys": ["super+shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/Add DocBlockr Line Before.sublime-macro"},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
]
}
]

View File

@@ -0,0 +1,10 @@
[
{
"caption": "DocBlockr: Decorate line comment",
"command": "jsdocs_decorate"
},
{
"caption": "DocBlockr: Reparse comment block",
"command": "jsdocs_reparse"
}
]

View File

@@ -0,0 +1,246 @@
[
// open a docblock with enter
{ "keys": ["enter"], "command": "jsdocs",
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\/\\*|###)\\*$", "match_all": true }
]
},
// open a docblock with keypad enter
{ "keys": ["keypad_enter"], "command": "jsdocs",
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\/\\*|###)\\*$", "match_all": true }
]
},
// open a docblock with tab
{ "keys": ["tab"], "command": "jsdocs",
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\/\\*|###)\\*$", "match_all": true }
]
},
// extend a docblock by adding an asterisk at the start
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*\\S", "match_all": true }
]
},
// extend a docblock by adding an asterisk at the start
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
]
},
// extend a docblock with keypad enter by adding an asterisk at the start
{ "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
]
},
// trim the automatically added whitespace
{ "keys": ["enter"], "command": "jsdocs_trim_auto_whitespace",
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "setting.trim_automatic_white_space", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\s*$", "match_all": true }
]
},
// trim the automatically added whitespace
{ "keys": ["keypad_enter"], "command": "jsdocs_trim_auto_whitespace",
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "setting.trim_automatic_white_space", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\s*$", "match_all": true }
]
},
// extend line comments (// and #)
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*((?:#|\\/\\/)\\s*).*/$1/}"},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "setting.jsdocs_extend_double_slash", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.line", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(\\/\\/|#)", "match_all": true }
]
},
// extend line comments (// #) with keypad enter
{ "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*((?:#|\\/\\/)\\s*).*$/$1/}"},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "setting.jsdocs_extend_double_slash", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.line", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\/", "match_all": true }
]
},
// close a block comment (/* */)
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n$0\n */"},
"context": [
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true }
]
},
// close a block comment (/* */)
{ "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n$0\n */"},
"context": [
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true }
]
},
{ "keys": ["tab"], "command": "insert_snippet", "args": {"contents": "\n$0\n */"},
"context": [
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true }
]
},
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n$0\n "}, "context":
[
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true},
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\*\\/\\s*$", "match_all": true}
]
},
{ "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n$0\n "}, "context":
[
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true},
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\*\\/$", "match_all": true}
]
},
// De-indent at the end of a comment block
{ "keys": ["enter"], "command": "jsdocs_deindent",
"context": [
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s+\\*/", "match_all": true }
]
},
// de-indent at the end of a comment block with keypad-enter
{ "keys": ["keypad_enter"], "command": "jsdocs_deindent",
"context": [
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s+\\*/", "match_all": true }
]
},
// Open an inline docblock (/** */)
{ "keys": ["shift+enter"], "command": "jsdocs", "args": {"inline": true},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*{2}$", "match_all": true }
]
},
// Open an inline docblock
{ "keys": ["shift+keypad_enter"], "command": "jsdocs", "args": {"inline": true},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*{2}$", "match_all": true }
]
},
// show the autocomplete
{ "keys": ["@"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/jsdocs-auto-complete.sublime-macro"},
"context": [
{ "key": "setting.auto_complete", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(?:\\/\\*|###)?\\*\\s*$", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }
]
},
// show the autocomplete in a coffee doc block
{ "keys": ["@"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/jsdocs-auto-complete.sublime-macro"},
"context": [
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*#\\s*$", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.line.number-sign.coffee", "match_all": true }
]
},
// indent to align with the previous line
{ "keys": ["tab"], "command": "jsdocs_indent",
"context": [
{ "key": "setting.jsdocs_deep_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*$", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }
]
},
// decorate a double-slash comment
{ "keys": ["ctrl+enter"], "command": "jsdocs_decorate",
"context": [
{ "key": "selector", "operator": "equal", "operand": "comment.line.double-slash"}
]
},
// decorate a double-slash comment
{ "keys": ["ctrl+keypad_enter"], "command": "jsdocs_decorate",
"context": [
{ "key": "selector", "operator": "equal", "operand": "comment.line.double-slash"}
]
},
// join lines inside a comment block, stripping the leading asterisk
{ "keys": ["ctrl+j"], "command": "jsdocs_join",
"context": [
{ "key": "selector", "operator": "equal", "operand": "comment.block" }
]
},
// join lines in a line comment, stripping the leading // or #
{ "keys": ["ctrl+j"], "command": "jsdocs_join",
"context": [
{ "key": "selector", "operator": "equal", "operand": "comment.line" }
]
},
// reparse a comment block's placeholders
{ "keys": ["ctrl+alt+tab"], "command": "jsdocs_reparse",
"context": [
{ "key": "selector", "operator": "equal", "operand": "comment.block" }
]
},
{ "keys": ["alt+q"], "command": "jsdocs_wrap_lines",
"context": [
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true }
]
},
// add line after, in a DocBlock
{ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/Add DocBlockr Line.sublime-macro"},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
]
},
// add line before, in a DocBlock
{ "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/Add DocBlockr Line Before.sublime-macro"},
"context": [
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
]
}
]

View File

@@ -0,0 +1,119 @@
# DocBlockr Extended Changelog
- **v2.10.0**, *21 February 2013*
- Adds Sublime Text 3 support (thanks to @lxe and @rmarscher)
- YUI-style `@method` tags can be automatically added with the `jsdocs_autoadd_method_tag` setting (thanks to @maheshjag)
- Variables starting with `$` are not wiped out when reparsing a doc block (thanks @ryrun)
- **v2.9.3**, *12 December 2012*
- Fixed bug which stopped regular comments from closing automatically
- **v2.9.2**, *11 December 2012*
- This one goes out to [Thanasis Polychronakis](https://github.com/thanpolas).
- Structure of the modules greatly improved
- Fixes bug with matching languages with hyphens in the name
- Adds support for CUDA-C++
- **v2.9.1**, *31 October 2012*
- Thanks to [wronex](https://github.com/wronex), <kbd>Alt+Q</kbd> will reformat the entire DocBlock, with customisable indentation.
- Thanks to [Pavel Voronin](https://github.com/pavel-voronin), spaces around arguments are handled properly.
- **C/C++**: Array arguments are accepted
- **C/C++**: An argument list containing only `void` doesn't output any `@param` tags
- **PHP**: Arguments with an array as a default value inside multi-line arguments are handled properly
- <kbd>Ctrl/Cmd + Enter</kbd> and <kbd>Ctrl/Cmd + Shift + Enter</kbd> work inside DocBlocks.
- **v2.9.0**, *1 October 2012*
- Adds ObjectiveC and ObjectiveC++ support, thanks to some help from [Robb Böhnke](https://github.com/robb)
- Very buggy code, support isn't great but it's better than nothing (hopefully).
- Single-line comments inside function definitions are handled
- Notation rules are applied to functions, which means they can define a return type by their name, eg: `strFoo`
- Notation rules can define arbitrary tags, for example: functions with a prefix of "_" should get the `@private` tag.
- Given the above addition, JS functions starting with an underscore are no longer marked as `@private` by default.
- **v2.8.2**, *28 September 2012*
- When a function is defined across many lines, the parser will find the arguments on extra lines.
- **v2.8.1**, *13 September 2012*
- Pressing <kbd>tab</kbd> on an empty line will perform a deep indentation instead of moving to the next field
- Functions starting with `_` will get a `@private` tag in Javascript (thanks to [Andrew Hanna](https://github.com/percyhanna))
- **v2.8.0**, *26 August 2012*
- New feature: <kbd>Alt+Q</kbd> to reformat the description field of a docblock to make it fit nicely within your ruler.
- Adds support for C++ (thanks to [Rafał Chłodnicki](https://github.com/rchl))
- Indenting to the description field works in languages which don't require type information in the docblock.
- **v2.7.4**, *8 August 2012*
- Fix for Actionscript docblocks not working
- **v2.7.3**, *7 August 2012*
- No trailing whitespace added on the spacer lines added when `jsdocs_spacer_between_sections` is on (thanks to [Rafał Chłodnicki](https://github.com/rchl))
- Fixes a bug with detecting variable names when they have a default value in PHP
- Changes the notation map to not ignore the leading `$` or `_`, meaning that (for example), you could specify that variables starting with `$` are `HTMLElement`s.
- **v2.7.2**, *6 August 2012*
- Small bug fix, thanks to [djuliusl](https://github.com/djuliusl)
- **v2.7.1**, *5 August 2012*
- Adds per-section alignment (can be set using `jsdocs_per_section_indent`)
- Description field for `@return` tag can be disabled using `jsdocs_return_description`. *(Both thanks to [Drarok](https://github.com/Drarok))*
- **v2.7.0**, *5 August 2012*
- Adds support for ASDocs (Actionscript)
- Changes Linux shortcut for reparsing a comment block to <kbd>Alt+Shift+Tab</kbd>
- **v2.6.5**, *19 June 2012*
- Bugfix for adding linebreaks when not at the start or end of a line
- **v2.6.4**, *4 June 2012*
- Better support for indentation using tabs
- YUI tags are supported by the autocomplete
- When only whitespace exists on a docblock line, and `trim_automatic_white_space` is set to true, the whitespace is removed.
- Better support for comment blocks opened with `/*`
- **v2.6.3**, *30 April 2012*
- Fixes the join-lines command <kbd>Ctrl+J</kbd> for CoffeeScript.
- **v2.6.2**, *22 March 2012*
- PHP `__destruct` functions don't get a return value *(thanks to [Alex Whitman](https://github.com/whitman))*.
- **v2.6.1**, *16 March 2012*
- Fixes bug whereby the return values of functions which are named `set` or `add`, *etc* were not being guessed correctly.
- `@return` tags are now given a description field *(thanks to [Nick Dowdell](https://github.com/mikulad13))*.
- **v2.6.0**, *4 March 2012*
- Added CoffeeScript support
- **v2.5.0**, *11 February 2012*
- Implemented DocBlock reparsing to re-enable tabstop fields. Hotkey is `Ctrl+Alt+Tab`.
- **v2.4.1**, *2 February 2012*
- Fixed bug [#36](https://github.com/spadgos/sublime-jsdocs/issues/36) whereby docblocks were not being properly extended inside of `<script>` tags in a HTML document.
- **v2.4.0**, *29 January 2012*
- `Enter` at the end of a comment block (ie: after the closing `*/`) will insert a newline and de-indent by one space.
- **v2.3.0**, *15 January 2012*
- `Ctrl+Enter` on a double-slash comment will now decorate that comment.
- Added a setting (`jsdocs_spacer_between_sections`) to add spacer lines between sections of a docblock.
- **v2.2.2**, *12 January 2012*
- Separated JS and PHP completions files. PHP completions don't have brackets around type information any more.
- PHP now uses `@var` (instead of `@type`) for documenting variable declarations.
- *Both of these changes are thanks to [svenax][svenax]*
- **v2.2.1**, *11 January 2012*
- DocBlocks can be triggered by pressing `tab` after `/**`
- Some bugfixes due to auto-complete changes in Sublime Text.
- Fixed bug where indenting would not work on the first line of a comment.
- **v2.2.0**, *5 January 2012*
- A configuration option can be set so that either `@return` or `@returns` is used in your documentation.
- Language-specific tags now will only show for that language (eg: PHP has no `@interface` tag).
- **v2.1.3**, *31 December 2011*
- Changed path for macro file to point to `Packages/DocBlockr`. If you are having issues, make sure that the plugin is installed in that location (**not** the previous location `Packages/JSDocs`).
- **v2.1.2**, *31 December 2011*
- Renamed from *JSDocs* to *DocBlockr*, since it now does more than just Javascript.
- **v2.1.1**, *23 November 2011*
- Fixed bug which broke the completions list
- **v2.1.0**, *19 November 2011*
- Added a command to join lines inside a docblock which is smart to leading asterisks
- Variable types are guessed from their name. `is` and `has` are assumed to be Booleans, and `callback`, `cb`, `done`, `fn` and `next` are assumed to be Functions.
- You can now define your own patterns for mapping a variable name to a type.
- Autocomplete works better now. `@` will also insert the "@" character, allowing you to add any tag you like, even if it isn't in the autocomplete list.
- Added the full set of [PHPDoc][phpdoc] tags.
- **v2.0.0**, *6 November 2011*
- PHP support added!
- (Almost) complete rewrite to allow for any new languages to be added easily
- *Please send feature requests or pull requests for new languages you'd like to add*
- More options for aligning tags
- **v1.3.0**, *5 November 2011*
- Improvements to handling of single-line comments
- Functions beginning with `is` or `has` are assumed to return Booleans
- Consolidated settings files into `Base File.sublime-settings`. **If you had configured your settings in `jsdocs.sublime-settings`, please move them to the Base File settings.**
- Setting `jsdocs_extend_double_slashes` controls whether single-line comments are extended.
- Pressing `tab` in a docblock will tab to match the description block of the previous tag. Use `jsdocs_deep_indent` to toggle this behaviour.
- **v1.2.0**, *6 October 2011*
- Variable declarations can be documented. `Shift+enter` to make these inline
- Double slash comments (`// like this`) are extended when `enter` is pressed
- Class definitions detected and treated slightly differently (no return values pre-filled)
- **v1.1.0**, *3 October 2011*
- DocBlockr parses the line following the comment to automatically prefill some documentation for you.
- Settings available via menu
- **v1.0.0**, *28 September 2011*
- Initial release
- Comments are automatically closed, extended and indented.

View File

@@ -0,0 +1,39 @@
[
{
"caption": "Preferences",
"mnemonic": "n",
"id": "preferences",
"children":
[
{
"caption": "Package Settings",
"mnemonic": "P",
"id": "package-settings",
"children":
[
{
"caption": "DocBlockr",
"children":
[
{
"command": "open_file", "args":
{
"file": "${packages}/DocBlockr/Base File.sublime-settings"
},
"caption": "Settings Default"
},
{
"command": "open_file", "args":
{
"file": "${packages}/User/Base File.sublime-settings"
},
"caption": "Settings User"
},
{ "caption": "-" }
]
}
]
}
]
}
]

View File

@@ -0,0 +1,366 @@
DocBlockr is a [Sublime Text 2][sublime] package which makes writing documentation a breeze. DocBlockr supports **Javascript**, **PHP**, **ActionScript**, **CoffeeScript**, **Java**, **Objective C**, **C** and **C++**.
## Installation ##
### With Package Control ###
**Recommended install**. If you have the [Package Control][package_control] package installed, you can install DocBlockr from inside Sublime Text itself. Open the Command Palette and select "Package Control: Install Package", then search for DocBlockr and you're done!
## Feature requests & bug reports ##
You can leave either of these things [here][issues]. Pull requests are welcomed heartily! In this repo, the main development branch is `develop` and the stable 'production' branch is `master`. Please remember to base your branch from `develop` and issue the pull request back to that branch.
## Changelog ##
- **v2.10.0**, *21 February 2013*
- Adds Sublime Text 3 support (thanks to @lxe and @rmarscher)
- YUI-style `@method` tags can be automatically added with the `jsdocs_autoadd_method_tag` setting (thanks to @maheshjag)
- Variables starting with `$` are not wiped out when reparsing a docblock (thanks @ryrun)
- **v2.9.3**, *12 December 2012*
- Fixed bug which stopped regular comments from closing automatically
- **v2.9.2**, *11 December 2012*
- This one goes out to [Thanasis Polychronakis](https://github.com/thanpolas).
- Structure of the modules greatly improved
- Fixes bug with matching languages with hyphens in the name
- Adds support for CUDA-C++
- **v2.9.1**, *31 October 2012*
- Thanks to [wronex](https://github.com/wronex), <kbd>Alt+Q</kbd> will reformat the entire DocBlock, with customisable indentation.
- Thanks to [Pavel Voronin](https://github.com/pavel-voronin), spaces around arguments are handled properly.
- **C/C++**: Array arguments are accepted
- **C/C++**: An argument list containing only `void` doesn't output any `@param` tags
- **PHP**: Arguments with an array as a default value inside multi-line arguments are handled properly
- <kbd>Ctrl/Cmd + Enter</kbd> and <kbd>Ctrl/Cmd + Shift + Enter</kbd> work inside DocBlocks.
Older history can be found in [the history file](https://github.com/spadgos/sublime-jsdocs/blob/master/HISTORY.md).
## Usage ##
> Below are some examples of what the package does. The pipe (`|`) indicates where the cursor will be after the action has run. Note that there are no keyboard shortcuts required to trigger these completions - just type as normal and it happens for you!
### Docblock completion ###
Pressing **enter** or **tab** after `/**` (or `###*` for Coffee-Script) will yield a new line and will close the comment.
/**<<enter>>
-- becomes --
/**
* |
*/
Single-asterisk comment blocks behave similarly:
/*<<enter>
-- becomes --
/*
|
*/
If you press asterisk on the first line, it becomes indented with the line above:
/*
|<<*>>
*/
/*
*|
*/
### Function documentation ###
However, if the line directly afterwards contains a function definition, then its name and parameters are parsed and some documentation is automatically added.
/**<<enter>>
function foobar (baz, quux) { }
-- becomes --
/**
* [foobar description]
* @param {[type]} baz [description]
* @param {[type]} quux [description]
* @return {[type]}
*/
function foobar (baz, quux) { }
You can then press `tab` to move between the different fields.
If you have many arguments, or long variable names, it might be useful to spread your arguments across multiple lines. DocBlockr will handle this situation too:
/**<<enter>>
function someLongFunctionName(
withArguments, across,
many, lines
) {
-- becomes --
/**
* [someLongFunctionName description]
* @param {[type]} withArguments [description]
* @param {[type]} across [description]
* @param {[type]} many [description]
* @param {[type]} lines [description]
* @return {[type]} [description]
*/
function someLongFunctionName(
withArguments, across,
many, lines
) {
In PHP, if [type hinting][typehinting] or default values are used, then those types are prefilled as the datatypes.
/**|<<enter>>
function foo(Array $arr, MyClass $cls, $str = "abc", $i = 0, $b = false) {}
/**
* [foo description]
* @param Array $arr [description]
* @param MyClass $cls [description]
* @param string $str [description]
* @param int $i [description]
* @param bool $b [description]
* @return [type]
*/
function foo(Array $arr, MyClass $cls, $str = "abc", $i = 0) {}
DocBlockr will try to make an intelligent guess about the return value of the function.
- If the function name is or begins with "set" or "add", then no `@return` is inserted.
- If the function name is or begins with "is" or "has", then it is assumed to return a `Boolean`.
- In Javascript, if the function begins with an uppercase letter then it is assumed that the function is a class definition. No `@return` tag is added.
- In Javascript, functions beginning with an underscore are assumed to be private: `@private` is added to these.
- In PHP, some of the [magic methods][magicmethods] have their values prefilled:
- `__construct`, `__destruct`, `__set`, `__unset`, `__wakeup` have no `@return` tag.
- `__sleep` returns an `Array`.
- `__toString` returns a `string`.
- `__isset` returns a `bool`.
In Javascript, functions beginning with an underscore are given a `@private` tag by default.
### Variable documentation ###
If the line following your docblock contains a variable declaration, DocBlockr will try to determine the data type of the variable and insert that into the comment.
/**<<enter>>
foo = 1
-- becomes --
/**
* [foo description]
* @type {Number}
*/
foo = 1
If you press `shift+enter` after the opening `/**` then the docblock will be inserted inline.
/**<<shift+enter>>
bar = new Module();
-- becomes --
/** @type {Module} [bar description] */
bar = new Module();
DocBlockr will also try to determine the type of the variable from its name. Variables starting with `is` or `has` are assumed to be booleans, and `callback`, `cb`, `done`, `fn`, and `next` are assumed to be functions. If you use your own variable naming system (eg: hungarian notation: booleans all start with `b`, arrays start with `arr`), you can define these rules yourself. Modify the `jsdocs_notation_map` setting *(in `Base File.sublime-settings`)* like so:
```javascript
{
"jsdocs_notation_map": [
{
"prefix": "b", // a prefix, matches only if followed by an underscore or A-Z
"type": "bool" // translates to "Boolean" in javascript, "bool" in PHP
},
{
"regex": "tbl_?[Rr]ow", // any arbitrary regex to test against the variable name
"type": "TableRow" // you can add your own types
}
]
}
```
The notation map can also be used to add arbitrary tags, according to your own code conventions. For example, if your conventions state that functions beginning with an underscore are private, you could add this to the `jsdocs_notation_map`:
```javascript
{
"prefix": "_",
"tags": ["@private"]
}
```
### Comment extension ###
Pressing enter inside a docblock will automatically insert a leading asterisk and maintain your indentation.
/**
* Foo bar<<enter>>
*/
-- becomes --
/**
* Foo bar
* |
*/
-- and --
/**
* @param foo Lorem ipsum dolor sit amet, consectetur
* adipisicing elit, sed do eiusmod tempor<<enter>>
*/
-- becomes --
/**
* @param foo Lorem ipsum dolor sit amet, consectetur
* adipisicing elit, sed do eiusmod tempor
* |
*/
This applies to docblock comments `/** like this */` as well as inline double-slash comments `// like this`
// foo<<enter>>
-- becomes
// foo
// |
In either case, you can press `shift+enter` to stop the automatic extension.
Oftentimes, when documenting a parameter, or adding a description to a tag, your description will cover multiple lines. If the line you are on is directly following a tag line, pressing `tab` will move the indentation to the correct position.
/**
* @param {String} foo Lorem ipsum dolor sit amet
* |<<tab>>
*/
-- becomes
/**
* @param {String} foo Lorem ipsum dolor sit amet
* |
*/
### Comment decoration ###
If you write a double-slash comment and then press `Ctrl+Enter`, DocBlockr will 'decorate' that line for you.
// Foo bar baz<<Ctrl+Enter>>
-- becomes
/////////////////
// Foo bar baz //
/////////////////
### Reparsing a DocBlock ###
Sometimes, you'll perform some action which clears the fields (sections of text which you can navigate through using `tab`). This leaves you with a number of placeholders in the DocBlock with no easy way to jump to them.
With DocBlockr, you can reparse a comment and reactivate the fields by pressing the hotkey `Ctrl+Alt+Tab` (`Alt+Shift+Tab` on Linux).
### Reformatting paragraphs ###
Inside a comment block, hit `Alt+Q` to wrap the lines to make them fit within your rulers. If you would like subsequent lines in a paragraph to be indented, you can adjust the `jsdocs_indentation_spaces_same_para` setting. For example, a value of `3` might look like this:
/**
* Duis sed arcu non tellus eleifend ullamcorper quis non erat. Curabitur
* metus elit, ultrices et tristique a, blandit at justo.
* @param {String} foo Lorem ipsum dolor sit amet.
* @param {Number} bar Nullam fringilla feugiat pretium. Quisque
* consectetur, risus eu pellentesque tincidunt, nulla ipsum imperdiet
* massa, sit amet adipiscing dolor.
* @return {[Type]}
*/
### Adding extra tags ###
Finally, typing `@` inside a docblock will show a completion list for all tags supported by [JSDoc][jsdoc], the [Google Closure Compiler][closure], [YUIDoc][yui] or [PHPDoc][phpdoc]. Extra help is provided for each of these tags by prefilling the arguments each expects. Pressing `tab` will move the cursor to the next argument.
## Configuration ##
You can access the configuration settings by selecting `Preferences -> Package Settings -> DocBlockr`.
*The `jsdocs_*` prefix is a legacy from days gone by...*
- `jsdocs_indentation_spaces` *(Number)* The number of spaces to indent after the leading asterisk.
// jsdocs_indentation_spaces = 1
/**
* foo
*/
// jsdocs_indentation_spaces = 5
/**
* foo
*/
- `jsdocs_align_tags` *(String)* Whether the words following the tags should align. Possible values are `'no'`, `'shallow'` and `'deep'`
> For backwards compatibility, `false` is equivalent to `'no'`, `true` is equivalent to `'shallow'`
`'shallow'` will align only the first words after the tag. eg:
@param {MyCustomClass} myVariable desc1
@return {String} foo desc2
@property {Number} blahblah desc3
`'deep'` will align each component of the tags, eg:
@param {MyCustomClass} myVariable desc1
@return {String} foo desc2
@property {Number} blahblah desc3
- `jsdocs_extra_tags` *(Array.String)* An array of strings, each representing extra boilerplate comments to add to *functions*. These can also include arbitrary text (not just tags).
// jsdocs_extra_tags = ['This is a cool function', '@author nickf', '@version ${1:version}']
/**<<enter>>
function foo (x) {}
/**
* [foo description]
* This is a cool function
* @author nickf
* @version [version]
* @param {[type]} x [description]
* @return {[type]}
*/
function foo (x) {}
- `jsdocs_extend_double_slash` *(Boolean)* Whether double-slash comments should be extended. An example of this feature is described above.
- `jsdocs_deep_indent` *(Boolean)* Whether pressing tab at the start of a line in docblock should indent to match the previous line's description field. An example of this feature is described above.
- `jsdocs_notation_map` *(Array)* An array of notation objects. Each notation object must define either a `prefix` OR a `regex` property, and a `type` property.
- `jsdocs_return_tag` *(String)* The text which should be used for a `@return` tag. By default, `@return` is used, however this can be changed to `@returns` if you use that style.
- `jsdocs_spacer_between_sections` *(Boolean)* If true, then extra blank lines are inserted between the sections of the docblock. Default: `false`.
- `jsdocs_indentation_spaces_same_para` *(Number)* Described above in the *Reformatting paragraphs* section. Default: `1`
- `jsdocs_autoadd_method_tag` *(Boolean)* Add a `@method` tag to docblocks of functions. Default: `false`
This is my first package for Sublime Text, and the first time I've written any Python, so I heartily welcome feedback and [feature requests or bug reports][issues].
## Show your love ##
[![Click here to lend your support to: DocBlockr and make a donation at www.pledgie.com !](https://www.pledgie.com/campaigns/16316.png?skin_name=chrome)](http://www.pledgie.com/campaigns/16316)
[closure]: http://code.google.com/closure/compiler/docs/js-for-compiler.html
[issues]: https://github.com/spadgos/sublime-jsdocs/issues
[jsdoc]: http://code.google.com/p/jsdoc-toolkit/wiki/TagReference
[magicmethods]: http://www.php.net/manual/en/language.oop5.magic.php
[package_control]: http://wbond.net/sublime_packages/package_control
[phpdoc]: http://phpdoc.org/
[sublime]: http://www.sublimetext.com/
[tags]: https://github.com/spadgos/sublime-jsdocs/tags
[typehinting]: http://php.net/manual/en/language.oop5.typehinting.php
[yui]: http://yui.github.com/yuidoc/syntax/index.html

View File

@@ -0,0 +1,17 @@
{
"scope": "source.actionscript comment.block",
"completions": [
{ "trigger": "@copy", "contents": "@copy ${1:[reference]}" },
{ "trigger": "@default", "contents": "@default ${1:[value]}" },
{ "trigger": "@eventType", "contents": "@eventType ${1:[package.class.CONSTANT]}" },
{ "trigger": "@example", "contents": "@example ${1:[exampleText]}" },
{ "trigger": "@exampleText", "contents": "@exampleText ${1:[string]}" },
{ "trigger": "@inheritDoc", "contents": "@inheritDoc" },
{ "trigger": "@internal", "contents": "@internal ${1:[text]}" },
{ "trigger": "@param", "contents": "@param ${1:[paramName]} ${2:[description]}" },
{ "trigger": "@private", "contents": "@private" },
{ "trigger": "@return", "contents": "@return ${1:[description]}" },
{ "trigger": "@see", "contents": "@see ${1:[reference]} ${2:[displayText]}" },
{ "trigger": "@throws", "contents": "@throws ${1:[package.class.className]} ${2:[description]}" }
]
}

View File

@@ -0,0 +1,81 @@
{
"scope": "source.coffee comment.block",
"completions":
[
{ "trigger" : "@async", "contents": ""},
{ "trigger" : "@augments", "contents": "@augments {${1:[type]}}"},
{ "trigger" : "@attribute", "contents": "@attribute ${1:[name]}"},
{ "trigger" : "@author", "contents": "@author ${1:[author]}"},
{ "trigger" : "@beta", "contents": ""},
{ "trigger" : "@borrows", "contents": "@borrows ${1:[otherMemberName]} as ${2:[thisMemberName]}"},
{ "trigger" : "@bubbles", "contents": "@bubbles ${1:[name]}"},
{ "trigger" : "@chainable", "contents": ""},
{ "trigger" : "@class", "contents": "@class ${1:[description]}"},
{ "trigger" : "@const", "contents": ""},
{ "trigger" : "@constant", "contents": ""},
{ "trigger" : "@constructor", "contents": ""},
{ "trigger" : "@constructs", "contents": ""},
{ "trigger" : "@copyright", "contents": "@copyright ${1:[description]}"},
{ "trigger" : "@default", "contents": "@default ${1:[value]}"},
{ "trigger" : "@define", "contents": "@define {${1:[type]}} ${2:[description]}"},
{ "trigger" : "@deprecated", "contents": "@deprecated ${1:[description]}"},
{ "trigger" : "@description", "contents": "@description ${1:[description]}"},
{ "trigger" : "@enum", "contents": "@enum {${1:[type]}}"},
{ "trigger" : "@event", "contents": ""},
{ "trigger" : "@example", "contents": "@example\n* "},
{ "trigger" : "@extends", "contents": "@extends {${1:[type]}}"},
{ "trigger" : "@extension", "contents": "@extension ${1:[class]}"},
{ "trigger" : "@extensionfor", "contents": "@extensionfor ${1:[class]}"},
{ "trigger" : "@extension_for", "contents": "@extension_for ${1:[class]}"},
{ "trigger" : "@field", "contents": ""},
{ "trigger" : "@fileOverview", "contents": "@fileOverview ${1:[description]}"},
{ "trigger" : "@final", "contents": ""},
{ "trigger" : "@for", "contents": "@for ${1:[class]}"},
{ "trigger" : "@function", "contents": ""},
{ "trigger" : "@ignore", "contents": ""},
{ "trigger" : "@implements", "contents": "@implements {${1:[type]}}"},
{ "trigger" : "@inheritDoc", "contents": ""},
{ "trigger" : "@inner", "contents": ""},
{ "trigger" : "@interface", "contents": ""},
{ "trigger" : "@internal", "contents": "@internal ${1:[private description]}"},
{ "trigger" : "@lends", "contents": "@lends ${1:[symbolAlias]}"},
{ "trigger" : "@license", "contents": "@license ${1:[url]} ${2:[description]}"},
{ "trigger" : "@main", "contents": "@main ${1:[module name]}"},
{ "trigger" : "@memberOf", "contents": "@memberOf ${1:[parentNamePath]}"},
{ "trigger" : "@method", "contents": "@method ${1:[name]}"},
{ "trigger" : "@module", "contents": "@module ${1:[module name]}"},
{ "trigger" : "@name", "contents": "@name {$1:[name]}"},
{ "trigger" : "@namespace", "contents": "@namespace ${1:[description]}"},
{ "trigger" : "@nosideeffects", "contents": ""},
{ "trigger" : "@optional", "contents": ""},
{ "trigger" : "@override", "contents": "@override"},
{ "trigger" : "@package", "contents": "@package ${1:[name]}"},
{ "trigger" : "@param", "contents": "@param {${1:[type]}} ${2:[varname]} ${3:[description]}" },
{ "trigger" : "@preserve", "contents": ""},
{ "trigger" : "@private", "contents": ""},
{ "trigger" : "@property", "contents": "@property {${1:[type]}} ${2:[propName]} ${3:[description]}"},
{ "trigger" : "@protected", "contents": ""},
{ "trigger" : "@public", "contents": ""},
{ "trigger" : "@readOnly", "contents": ""},
{ "trigger" : "@required", "contents": ""},
{ "trigger" : "@requires", "contents": "@requires ${1:[description]}"},
{ "trigger" : "@return", "contents": "@return {${1:[type]}} ${2:[description]}" },
{ "trigger" : "@returns", "contents": "@returns {${1:[type]}} ${2:[description]}" },
{ "trigger" : "@see", "contents": "@see ${1:[description]}"},
{ "trigger" : "@since", "contents": "@since ${1:[version]}"},
{ "trigger" : "@static", "contents": ""},
{ "trigger" : "@sumodule", "contents": "@submodule ${1:[submodule]}"},
{ "trigger" : "@subpackage", "contents": "@subpackage ${1:[name]}"},
{ "trigger" : "@this", "contents": "@this {${1:[type]}}"},
{ "trigger" : "@throws", "contents": "@throws {${1:[exceptionType]}} If ${2:[this condition is met]}"},
{ "trigger" : "@todo", "contents": "@todo ${1:[description]}"},
{ "trigger" : "@tutorial", "contents": "@tutorial ${1:[link]}"},
{ "trigger" : "@type", "contents": "@type {${1:[type]}}"},
{ "trigger" : "@typedef", "contents": "@typedef {${1:[type]}}"},
{ "trigger" : "@uses", "contents": "@uses ${1:[object]} ${2:[description]}"},
{ "trigger" : "@var", "contents": "@var {${1:[type]}} ${2:[description]}"},
{ "trigger" : "@version", "contents": "@version ${1:[version]}"},
{ "trigger" : "@writeOnce", "contents": ""},
{ "trigger" : "{@link}", "contents": "{@link ${1:[symbol]}}"}
]
}

View File

@@ -0,0 +1,25 @@
{
"scope": "source.java comment.block.documentation",
"completions":
[
{ "trigger" : "@author", "contents": "@author ${1:[author]}"},
{ "trigger" : "@deprecated", "contents": "@deprecated ${1:[deprecated-text]}"},
{ "trigger" : "@exception", "contents": "@exception ${1:[class-name]} ${2:[description]}"},
{ "trigger" : "@param", "contents": "@param ${1:[parameter-name]} ${2:[description]}"},
{ "trigger" : "@return", "contents": "@return ${1:[description]}"},
{ "trigger" : "@see", "contents": "@see ${1:[reference]}"},
{ "trigger" : "@serial", "contents": "@serial ${1:[description | include | exclude]}"},
{ "trigger" : "@serialField", "contents": "@serialField ${1:[field-name]} ${2:[field-type]} ${3:[field-description]}"},
{ "trigger" : "@serialDate", "contents": "@serialDate ${1:[data-description]}"},
{ "trigger" : "@since", "contents": "@since ${1:[since-text]}"},
{ "trigger" : "@throws", "contents": "@throws ${1:[class-name]} ${2:[description]}"},
{ "trigger" : "@version", "contents": "@version ${1:[version-text]}"},
{ "trigger" : "{@code}", "contents": "{@code ${1:[text]}}"},
{ "trigger" : "{@docRoot}", "contents": "{@docRoot}"},
{ "trigger" : "{@inheritDoc}", "contents": "{@inheritDoc}"},
{ "trigger" : "{@link}", "contents": "{@link ${1:[package.class#member]} ${2:[label]}}"},
{ "trigger" : "{@linkplain}", "contents": "{@linkplain ${1:[package.class#member]} ${2:[label]}}"},
{ "trigger" : "{@literal}", "contents": "{@literal ${1:[text]}}"},
{ "trigger" : "{@value}", "contents": "{@value ${1:[package.class#field]}}"}
]
}

View File

@@ -0,0 +1,81 @@
{
"scope": "source.js comment.block.documentation",
"completions":
[
{ "trigger" : "@async", "contents": ""},
{ "trigger" : "@augments", "contents": "@augments {${1:[type]}}"},
{ "trigger" : "@attribute", "contents": "@attribute ${1:[name]}"},
{ "trigger" : "@author", "contents": "@author ${1:[author]}"},
{ "trigger" : "@beta", "contents": ""},
{ "trigger" : "@borrows", "contents": "@borrows ${1:[otherMemberName]} as ${2:[thisMemberName]}"},
{ "trigger" : "@bubbles", "contents": "@bubbles ${1:[name]}"},
{ "trigger" : "@chainable", "contents": ""},
{ "trigger" : "@class", "contents": "@class ${1:[description]}"},
{ "trigger" : "@const", "contents": ""},
{ "trigger" : "@constant", "contents": ""},
{ "trigger" : "@constructor", "contents": ""},
{ "trigger" : "@constructs", "contents": ""},
{ "trigger" : "@copyright", "contents": "@copyright ${1:[description]}"},
{ "trigger" : "@default", "contents": "@default ${1:[value]}"},
{ "trigger" : "@define", "contents": "@define {${1:[type]}} ${2:[description]}"},
{ "trigger" : "@deprecated", "contents": "@deprecated ${1:[description]}"},
{ "trigger" : "@description", "contents": "@description ${1:[description]}"},
{ "trigger" : "@enum", "contents": "@enum {${1:[type]}}"},
{ "trigger" : "@event", "contents": ""},
{ "trigger" : "@example", "contents": "@example\n* "},
{ "trigger" : "@extends", "contents": "@extends {${1:[type]}}"},
{ "trigger" : "@extension", "contents": "@extension ${1:[class]}"},
{ "trigger" : "@extensionfor", "contents": "@extensionfor ${1:[class]}"},
{ "trigger" : "@extension_for", "contents": "@extension_for ${1:[class]}"},
{ "trigger" : "@field", "contents": ""},
{ "trigger" : "@fileOverview", "contents": "@fileOverview ${1:[description]}"},
{ "trigger" : "@final", "contents": ""},
{ "trigger" : "@for", "contents": "@for ${1:[class]}"},
{ "trigger" : "@function", "contents": ""},
{ "trigger" : "@ignore", "contents": ""},
{ "trigger" : "@implements", "contents": "@implements {${1:[type]}}"},
{ "trigger" : "@inheritDoc", "contents": ""},
{ "trigger" : "@inner", "contents": ""},
{ "trigger" : "@interface", "contents": ""},
{ "trigger" : "@internal", "contents": "@internal ${1:[private description]}"},
{ "trigger" : "@lends", "contents": "@lends ${1:[symbolAlias]}"},
{ "trigger" : "@license", "contents": "@license ${1:[url]} ${2:[description]}"},
{ "trigger" : "@main", "contents": "@main ${1:[module name]}"},
{ "trigger" : "@memberOf", "contents": "@memberOf ${1:[parentNamePath]}"},
{ "trigger" : "@method", "contents": "@method ${1:[name]}"},
{ "trigger" : "@module", "contents": "@module ${1:[module name]}"},
{ "trigger" : "@name", "contents": "@name {$1:[name]}"},
{ "trigger" : "@namespace", "contents": "@namespace ${1:[description]}"},
{ "trigger" : "@nosideeffects", "contents": ""},
{ "trigger" : "@optional", "contents": ""},
{ "trigger" : "@override", "contents": "@override"},
{ "trigger" : "@package", "contents": "@package ${1:[name]}"},
{ "trigger" : "@param", "contents": "@param {${1:[type]}} ${2:[varname]} ${3:[description]}" },
{ "trigger" : "@preserve", "contents": ""},
{ "trigger" : "@private", "contents": ""},
{ "trigger" : "@property", "contents": "@property {${1:[type]}} ${2:[propName]} ${3:[description]}"},
{ "trigger" : "@protected", "contents": ""},
{ "trigger" : "@public", "contents": ""},
{ "trigger" : "@readOnly", "contents": ""},
{ "trigger" : "@required", "contents": ""},
{ "trigger" : "@requires", "contents": "@requires ${1:[description]}"},
{ "trigger" : "@return", "contents": "@return {${1:[type]}} ${2:[description]}" },
{ "trigger" : "@returns", "contents": "@returns {${1:[type]}} ${2:[description]}" },
{ "trigger" : "@see", "contents": "@see ${1:[description]}"},
{ "trigger" : "@since", "contents": "@since ${1:[version]}"},
{ "trigger" : "@static", "contents": ""},
{ "trigger" : "@sumodule", "contents": "@submodule ${1:[submodule]}"},
{ "trigger" : "@subpackage", "contents": "@subpackage ${1:[name]}"},
{ "trigger" : "@this", "contents": "@this {${1:[type]}}"},
{ "trigger" : "@throws", "contents": "@throws {${1:[exceptionType]}} If ${2:[this condition is met]}"},
{ "trigger" : "@todo", "contents": "@todo ${1:[description]}"},
{ "trigger" : "@tutorial", "contents": "@tutorial ${1:[link]}"},
{ "trigger" : "@type", "contents": "@type {${1:[type]}}"},
{ "trigger" : "@typedef", "contents": "@typedef {${1:[type]}}"},
{ "trigger" : "@uses", "contents": "@uses ${1:[object]} ${2:[description]}"},
{ "trigger" : "@var", "contents": "@var {${1:[type]}} ${2:[description]}"},
{ "trigger" : "@version", "contents": "@version ${1:[version]}"},
{ "trigger" : "@writeOnce", "contents": ""},
{ "trigger" : "{@link}", "contents": "{@link ${1:[symbol]}}"}
]
}

View File

@@ -0,0 +1,4 @@
[
{"command": "insert_snippet", "args": {"contents": "@"}},
{"command": "auto_complete"}
]

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
{"url": "https://github.com/spadgos/sublime-jsdocs", "version": "2013.02.21.05.38.44", "description": "Simplifies writing DocBlock comments in Javascript, PHP, CoffeeScript, Actionscript, C & C++"}

View File

@@ -0,0 +1,45 @@
{
"scope": "source.php comment.block.documentation",
"completions":
[
{ "trigger" : "@abstract", "contents": ""},
{ "trigger" : "@access", "contents": "@access ${1:[public]}"},
{ "trigger" : "@author", "contents": "@author ${1:[author]} ${3:<${2:[email]}>}" },
{ "trigger" : "@category", "contents": "@category ${1:[category]}"},
{ "trigger" : "@copyright", "contents": "@copyright ${1:[description]}"},
{ "trigger" : "@deprecated", "contents": "@deprecated ${1:[description]}"},
{ "trigger" : "@example", "contents": "@example\n* "},
{ "trigger" : "@extends", "contents": "@extends ${1:[type]}"},
{ "trigger" : "@filesource", "contents": ""},
{ "trigger" : "@final", "contents": ""},
{ "trigger" : "@global", "contents": "@global ${1:[type]} ${2:name}"},
{ "trigger" : "@ignore", "contents": ""},
{ "trigger" : "@implements", "contents": "@implements ${1:[type]}"},
{ "trigger" : "@internal", "contents": "@internal ${1:[private description]}"},
{ "trigger" : "@license", "contents": "@license ${1:[url]} ${2:[description]}"},
{ "trigger" : "@link", "contents": "@link ${1:[url]} ${2:[description]}"},
{ "trigger" : "@method", "contents": "@method {${1:[return type]}} ${2:[name]}() ${2:[name]}(${3:[args]}) ${4:[description]}"},
{ "trigger" : "@name", "contents": "@name {$1:[name]}"},
{ "trigger" : "@namespace", "contents": "@namespace ${1:[description]}"},
{ "trigger" : "@package", "contents": "@package ${1:[name]}"},
{ "trigger" : "@param", "contents": "@param ${1:[type]} ${2:[varname]} ${3:[description]}" },
{ "trigger" : "@property", "contents": "@property ${1:[type]} ${2:[varname]} ${3:[description]}"},
{ "trigger" : "@return", "contents": "@return ${1:[type]} ${2:[description]}" },
{ "trigger" : "@see", "contents": "@see ${1:[description]}"},
{ "trigger" : "@since", "contents": "@since ${1:[version]}"},
{ "trigger" : "@static", "contents": ""},
{ "trigger" : "@staticvar", "contents": "@staticvar ${1:[type]} ${2:[description]}"},
{ "trigger" : "@subpackage", "contents": "@subpackage ${1:[name]}"},
{ "trigger" : "@throws", "contents": "@throws ${1:[exceptionType]} If ${2:[this condition is met]}"},
{ "trigger" : "@todo", "contents": "@todo ${1:[description]}"},
{ "trigger" : "@tutorial", "contents": "@tutorial ${1:[path]}"},
{ "trigger" : "@uses", "contents": "@uses ${1:[object]} ${2:[description]}"},
{ "trigger" : "@var", "contents": "@var ${1:[type]} ${2:[description]}"},
{ "trigger" : "@version", "contents": "@version ${1:[version]}"},
{ "trigger" : "{@example}", "contents": "{@example ${1:[path]}}"},
{ "trigger" : "{@inheritdoc}", "contents": ""},
{ "trigger" : "{@link}", "contents": "{@link ${1:[url]}}"},
{ "trigger" : "{@source}", "contents": ""},
{ "trigger" : "{@tutorial}", "contents": "{@tutorial ${1:[path]}}"}
]
}