├── Templates ├── xml.json ├── html.json └── textastic.json ├── LICENSE ├── README.md └── CodeCompletion ├── css.json ├── c.json ├── objc.json ├── html.json └── js.json /Templates/xml.json: -------------------------------------------------------------------------------- 1 | { 2 | "uuid": "08163C89-323B-45EF-BC9D-BFCD1052B9E0", 3 | "category": "XML", 4 | "templates": [ 5 | { 6 | "name": "XML", 7 | "fileExtension": "xml", 8 | "snippet": "\n$0" 9 | } 10 | 11 | ] 12 | } -------------------------------------------------------------------------------- /Templates/html.json: -------------------------------------------------------------------------------- 1 | { 2 | "uuid": "74C6D420-A016-4659-AF92-B5CCC1AE53BB", 3 | "category": "Web", 4 | "templates": [ 5 | { 6 | "name": "HTML5", 7 | "fileExtension": "html", 8 | "snippet": "\n\n\n\t\n\t${1:untitled}<\/title>\n<\/head>\n\n<body>\n\t$0\n<\/body>\n<\/html>" 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /Templates/textastic.json: -------------------------------------------------------------------------------- 1 | { 2 | "uuid": "D2701A4E-042C-43DB-8F41-060E980BE75B", 3 | "category": "Textastic", 4 | "templates": [ 5 | { 6 | "name": "Template", 7 | "fileExtension": "json", 8 | "snippet": "{\n\t\"uuid\": \"$UUID\",\n\t\"category\": \"${1:Category Name}\",\n\t\"templates\": [\n\t\t{\n\t\t\t\"name\": \"${2:Template Name}\",\n\t\t\t\"fileExtension\": \"${3:html}\",\n\t\t\t\"snippet\": \"$0\"\n\t\t}\n\t]\n}" 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Alexander Blach (http://www.textasticapp.com/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Textastic Customization Files 2 | 3 | Creating a *#Textastic* directory in your *Local Files* in Textastic allows customization of templates, code completion, and file previews within the app. 4 | 5 | *See [the manual](https://www.textasticapp.com/v10/manual/customization/custom_syntax_themes_templates.html#add-customization-folder) for more information.* 6 | 7 | ## Markdown Preview 8 | 9 | Use *markdown_head.html* to add custom HTML to the `<head>` of the Markdown preview experience for things like loading external JavaScript libraries. Use *markdown.css* to define styles to use in the Markdown preview experience. 10 | 11 | *See [the manual](https://www.textasticapp.com/v10/manual/viewing_editing_files/web_preview.html) for more information.* 12 | 13 | ## Templates 14 | 15 | Template files are located in the *Templates* subdirectory. 16 | 17 | ### File Format 18 | 19 | Textastic templates are simple JSON files with the following format: 20 | 21 | ```json 22 | { 23 | "uuid": "74C6D420-A016-4659-AF92-B5CCC1AE53BB", 24 | "category": "HTML", 25 | "templates": [ 26 | { 27 | "name": "HTML5", 28 | "fileExtension": "html", 29 | "snippet": "<!DOCTYPE HTML>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title>${1:untitled}<\/title>\n<\/head>\n\n<body>$0\n<\/body>\n<\/html>" 30 | } 31 | ] 32 | } 33 | ``` 34 | 35 | * `uuid`: uniquely identifies the template file 36 | * `category`: the category under which the templates in this file appear in the the template selection view 37 | * `templates`: contains an array of code templates 38 | * `name`: the name under which this template appears in the template selection view 39 | * `fileExtension`: the file extension that is automatically added to the file name when the user selects this template 40 | * `snippet`: The snippet that is inserted after the file is created. Be sure to escape new line and tab characters with \n and \t. 41 | 42 | Always use tab characters for indentation - if necessary, Textastic will replace them with space characters depending on the current settings. 43 | 44 | Have a look at the [TextMate manual entry on snippets](https://manual.macromates.com/en/snippets) for an overview of the snippet syntax. Textastic supports tab stops, placeholders, mirrors and transformations. 45 | 46 | Currently, only the `$UUID` variable is supported. It automatically creates a new `uuid` and inserts it. 47 | 48 | ### Creating new templates 49 | 50 | If you want to create a new template, create a UTF-8 .json file in the *"Local Files/#Textastic/Templates"* folder in Textastic and choose the template called "Template" in the "Textastic" category. 51 | 52 | This will automatically create a new template file with a new `uuid`. Use the tab key to go from tab stop to tab stop and enter the necessary information. Be sure to save the template in the *"Local Files/#Textastic/Templates"* folder or it will not be loaded by Textastic. 53 | 54 | *Note*: you can also manually create `uuid`s using the `uuidgen` terminal command on Mac OS X. 55 | 56 | ### Modifying existing templates 57 | 58 | If you want to modify existing templates, you can get the template files from this repository, edit them and put the modified files in the *"Local Files/#Textastic/Templates"* folder. Textastic will pick up the changes immediately when you open the template selection view in the file creation dialog. 59 | 60 | It is important that you do not change the `uuid`, so that your custom files will be used instead of the built-in ones with the same `uuid`. This behavior is the same as for custom syntax definitions as explained [in the manual](https://www.textasticapp.com/v10/manual/customization/custom_syntax_themes_templates.html). 61 | 62 | ## Code Completion 63 | 64 | All code completion files are located in the *CodeCompletion* subdirectory. 65 | 66 | If you want to modify code completion definitions, you can edit them and put them in the *"Local Files/#Textastic/CodeCompletion"* folder. Textastic will pick up the changes *at application startup time*, so you have to manually quit the app. If you do not change the `uuid`, your custom files will be used instead of the built-in ones. This behavior is the same as for custom syntax definitions as explained [in the manual](https://www.textasticapp.com/v10/manual/customization/custom_syntax_themes_templates.html). 67 | 68 | *TODO: document file format* 69 | 70 | ## License 71 | 72 | Textastic customization files in this repository are released under the MIT license (see the LICENSE file). 73 | 74 | ## Contact / Bugs / Features 75 | 76 | If you want to add or modify templates or code completion files to Textastic, I happily accept pull requests. If they are useful to a broad audience, I will add them to future version of Textastic. 77 | 78 | For more contact options and the feedback forum, please visit the [Textastic website](https://www.textasticapp.com/). 79 | -------------------------------------------------------------------------------- /CodeCompletion/css.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Textastic Code Completion for CSS", 3 | "uuid": "7918FCDA-429B-474B-919D-D352311D4274", 4 | 5 | "completionSets": [ 6 | { 7 | "name": "css.properties", 8 | "defaultAppend": ": $0;", 9 | "strings": [ 10 | "azimuth", 11 | "background", 12 | "background-attachment", 13 | "background-clip", 14 | "background-color", 15 | "background-image", 16 | "background-origin", 17 | "background-position", 18 | "background-position-x", 19 | "background-position-y", 20 | "background-repeat", 21 | "background-size", 22 | { 23 | "string": "border", 24 | "append": ": ${1:${2:1px} ${3:solid} ${4:#999}};" 25 | }, 26 | { 27 | "string": "border-bottom", 28 | "append": ": ${1:${2:1px} ${3:solid} ${4:#999}};" 29 | }, 30 | "border-bottom-color", 31 | "border-bottom-style", 32 | "border-bottom-width", 33 | "border-collapse", 34 | "border-color", 35 | { 36 | "string": "border-left", 37 | "append": ": ${1:${2:1px} ${3:solid} ${4:#999}};" 38 | }, 39 | "border-left-color", 40 | "border-left-style", 41 | "border-left-width", 42 | { 43 | "string": "border-right", 44 | "append": ": ${1:${2:1px} ${3:solid} ${4:#999}};" 45 | }, 46 | "border-right-color", 47 | "border-right-style", 48 | "border-right-width", 49 | "border-spacing", 50 | "border-style", 51 | { 52 | "string": "border-top", 53 | "append": ": ${1:${2:1px} ${3:solid} ${4:#999}};" 54 | }, 55 | "border-top-color", 56 | "border-top-style", 57 | "border-top-width", 58 | "border-width", 59 | "bottom", 60 | "caption-side", 61 | "clear", 62 | "clip", 63 | "color", 64 | "content", 65 | "counter-increment", 66 | "counter-reset", 67 | "cue", 68 | "cue-after", 69 | "cue-before", 70 | "cursor", 71 | "direction", 72 | "display", 73 | "elevation", 74 | "empty-cells", 75 | "float", 76 | { 77 | "string": "font", 78 | "append": ": ${1:${2:bold} ${3:1em}${4:/1.5em} ${5:Verdana, Geneva, sans-serif}};" 79 | }, 80 | "font-family", 81 | "font-size", 82 | "font-size-adjust", 83 | "font-stretch", 84 | "font-style", 85 | "font-variant", 86 | "font-weight", 87 | "filter", 88 | "height", 89 | "image-orientation", 90 | "left", 91 | "letter-spacing", 92 | "line-height", 93 | "list-style", 94 | "list-style-image", 95 | "list-style-position", 96 | "list-style-type", 97 | "margin", 98 | "margin-bottom", 99 | "margin-left", 100 | "margin-right", 101 | "margin-top", 102 | "marker-offset", 103 | "max-height", 104 | "max-width", 105 | "min-height", 106 | "min-width", 107 | "opacity", 108 | "orphans", 109 | "outline", 110 | "outline-color", 111 | "outline-offset", 112 | "outline-style", 113 | "outline-width", 114 | "overflow", 115 | "overflow-x", 116 | "overflow-y", 117 | "padding", 118 | "padding-bottom", 119 | "padding-left", 120 | "padding-right", 121 | "padding-top", 122 | "page", 123 | "page-break-after", 124 | "page-break-before", 125 | "page-break-inside", 126 | "pause", 127 | "pause-after", 128 | "pause-before", 129 | "pitch", 130 | "pitch-range", 131 | "play-during", 132 | "pointer-events", 133 | "position", 134 | "quotes", 135 | "resize", 136 | "richness", 137 | "right", 138 | "size", 139 | "speak", 140 | "speak-header", 141 | "speak-numeral", 142 | "speak-punctuation", 143 | "speech-rate", 144 | "src", 145 | "stress", 146 | "table-layout", 147 | "text-align", 148 | "text-decoration", 149 | "text-indent", 150 | "text-overflow", 151 | "text-shadow", 152 | "text-transform", 153 | "top", 154 | "unicode-bidi", 155 | "unicode-range", 156 | "vertical-align", 157 | "visibility", 158 | "voice-family", 159 | "volume", 160 | "white-space", 161 | "widows", 162 | "width", 163 | "word-break", 164 | "word-spacing", 165 | "word-wrap", 166 | "z-index", 167 | "zoom" 168 | ] 169 | }, 170 | { 171 | "name": "css.properties.css3", 172 | "defaultAppend": ": $0;", 173 | "strings": [ 174 | // CSS3 specs; final recommendations, but may not be implemented in browsers yet 175 | 176 | // http://www.w3.org/TR/css3-animations/ 177 | "animation", 178 | "animation-delay", 179 | "animation-direction", 180 | "animation-duration", 181 | "animation-fill-mode", 182 | "animation-iteration-count", 183 | "animation-name", 184 | "animation-play-state", 185 | "animation-timing-function", 186 | 187 | // http://dev.w3.org/csswg/css3-3d-transforms/ 188 | "transform", 189 | "transform-origin", 190 | "transform-style", 191 | "perspective-", 192 | "perspective-origin", 193 | "backface-visibility", 194 | 195 | // http://www.w3.org/TR/css3-page/ 196 | "fit", 197 | "fit-position", 198 | 199 | // http://www.w3.org/TR/css3-ruby/ 200 | "ruby-position", 201 | "ruby-align", 202 | "ruby-overhang", 203 | "ruby-span", 204 | 205 | // http://www.w3.org/TR/css3-marquee/ 206 | "overflow-style", 207 | "marquee-style", 208 | "marquee-play-count", 209 | "marquee-direction", 210 | "marquee-speed", 211 | 212 | // http://www.w3.org/TR/css3-ui/ 213 | "appearance", 214 | "icon", 215 | "box-sizing", 216 | "nav-index", 217 | "nav-up", 218 | "nav-right", 219 | "nav-down", 220 | "nav-left", 221 | 222 | // http://www.w3.org/TR/css3-multicol/ 223 | "column-width", 224 | "column-count", 225 | "columns", 226 | "column-gap", 227 | "column-rule-color", 228 | "column-rule-style", 229 | "column-rule-width", 230 | "column-rule", 231 | "break-before", 232 | "break-after", 233 | "break-inside", 234 | "column-span", 235 | "column-fill", 236 | 237 | // http://www.w3.org/TR/css3-background/ 238 | "border-image-slice", 239 | "border-image-source", 240 | "border-image-width", 241 | "border-image-outset", 242 | "border-image-repeat", 243 | { 244 | "string": "border-image", 245 | "append": ": ${1:${2:url('${3:../images/border.jpg}')} ${4:5 3 5 3} ${5:repeat stretch}};" 246 | }, 247 | "border-bottom-right-radius", 248 | "border-bottom-left-radius", 249 | "border-top-right-radius", 250 | "border-top-left-radius", 251 | "border-radius", 252 | { 253 | "string": "box-shadow", 254 | "append": ": ${1:${2:0px} ${3:3px} ${4:5px} ${5:#333}};" 255 | }, 256 | 257 | // http://www.w3.org/TR/css3-flexbox/ 258 | "box-orient", 259 | "box-direction", 260 | "box-ordinal-group", 261 | "box-align", 262 | "box-flex", 263 | "box-flex-group", 264 | "box-pack", 265 | "box-lines", 266 | 267 | // http://www.w3.org/TR/WD-font/ 268 | "font-smooth" 269 | ] 270 | } 271 | ], 272 | 273 | "contexts": [ 274 | { 275 | "description": "CSS Property Completion", 276 | "scope": "source.css meta.property-list.css, source.css.less", 277 | "pattern": "(?<!:)(?:^|\\s|;)([a-zA-Z\\-+]+)", 278 | "completionCaptureIndex": 1, 279 | "completionSetNames": [ 280 | "css.properties", 281 | "css.properties.css3" 282 | ] 283 | }, 284 | { 285 | "description": "CSS At-Rule Completion", 286 | "scope": "source.css - meta.property-list.css, source.css.less", 287 | "pattern": "(?:^|\\s|\\})(@[a-zA-Z-+]*)", 288 | "completionCaptureIndex": 1, 289 | "completionSetNames": [ 290 | // this is done through Emmet 291 | ] 292 | } 293 | ] 294 | } -------------------------------------------------------------------------------- /CodeCompletion/c.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Textastic Code Completion for C", 3 | "uuid": "5172F0C4-E2A6-4EC4-ADFA-B946A09FC070", 4 | 5 | "completionSets": [ 6 | { 7 | "name": "c.keywords.control", 8 | "defaultAppend": "", 9 | 10 | "strings": [ 11 | "return", 12 | { "string": "break", "append": ";" }, 13 | { "string": "case", "append": " ${1:condition}: " }, 14 | { "string": "continue", "append": ";" }, 15 | { "string": "default", "append": ":" }, 16 | { "string": "do", "append": " {\n\t$0\n} while ($1);" }, 17 | { "string": "else", "append": " {\n\t$0\n}" }, 18 | { "string": "for", "append": " (${1:i = 0}; i ${3:< count}; ${4:i++}) {\n\t$0\n}" }, 19 | { "string": "goto", "append": " ${1:label};" }, 20 | { "string": "if", "append": " ($1) {\n\t$0\n}" }, 21 | { "string": "switch", "append": " ($1) {\n\t$0\n}" }, 22 | { "string": "while", "append": " ($1) {\n\t$2\n}" } 23 | ] 24 | }, 25 | { 26 | "name": "c.keywords.control.else-if", 27 | "defaultAppend": "", 28 | 29 | "strings": [ 30 | { "string": "else if", "append": " ($1) {\n\t$0\n}" } 31 | ] 32 | }, 33 | { 34 | "name": "c.keywords.structures", 35 | "defaultAppend": "", 36 | 37 | "strings": [ 38 | "struct", 39 | "union", 40 | "enum", 41 | { "string": "enumdef", "replace": "enum ${1:name} {\n\t${2:enumerator1} = ${3:value1}\n\t${4:enumerator2} = ${5:value2}\n};" }, 42 | { "string": "structdef", "replace": "struct ${1:name} {\n\t${2:members}\n};" }, 43 | { "string": "typedef", "append": " ${1:existing} ${2:new};" }, 44 | { "string": "uniondef", "replace": "union ${1:name} {\n\t${2:members}\n};" } 45 | ] 46 | }, 47 | { 48 | "name": "c.keywords.operators", 49 | "defaultAppend": "", 50 | 51 | "strings": [ 52 | { "string": "sizeof", "append": "(${1:type})$0" } 53 | ] 54 | }, 55 | { 56 | "name": "c.keywords.dataTypes", 57 | "defaultAppend": "", 58 | 59 | "strings": [ 60 | "void", 61 | "char", 62 | "double", 63 | "float", 64 | "int", 65 | "long", 66 | "short", 67 | "signed", 68 | "unsigned" 69 | ] 70 | }, 71 | { 72 | "name": "c.keywords.storageClasses", 73 | "defaultAppend": "", 74 | 75 | "strings": [ 76 | "auto", 77 | "extern", 78 | "register", 79 | "static" 80 | ] 81 | }, 82 | { 83 | "name": "c.keywords.typeQualifiers", 84 | "defaultAppend": "", 85 | 86 | "strings": [ 87 | "const", 88 | "volatile" 89 | ] 90 | }, 91 | { 92 | "name": "c.constants", 93 | "defaultAppend": "", 94 | 95 | "strings": [ 96 | "true", 97 | "false", 98 | "NULL" 99 | ] 100 | }, 101 | 102 | { 103 | "name": "c.functions", 104 | "defaultAppend": "($1)", 105 | 106 | "strings": [ 107 | { "string": "free", "append": "(${1:pointer})" }, 108 | { "string": "malloc", "append": "(${1:size})" }, 109 | "abort", 110 | "abs", 111 | "acos", 112 | "asctime", 113 | "asin", 114 | "assert", 115 | "atan", 116 | "atan2", 117 | "atexit", 118 | "atof", 119 | "atoi", 120 | "atol", 121 | "bsearch", 122 | "calloc", 123 | "ceil", 124 | "clearerr", 125 | "clock", 126 | "cos", 127 | "cosh", 128 | "ctime", 129 | "difftime", 130 | "div", 131 | "ecvt", 132 | "exit", 133 | "exp", 134 | "fabs", 135 | "fclose", 136 | "fcvt", 137 | "feof", 138 | "ferror", 139 | "fflush", 140 | "fgetc", 141 | "fgetpos", 142 | "fgets", 143 | "floor", 144 | "fmod", 145 | "fopen", 146 | "fprintf", 147 | "fputc", 148 | "fputchar", 149 | "fputs", 150 | "fread", 151 | "free", 152 | "freopen", 153 | "frexp", 154 | "fscanf", 155 | "fseek", 156 | "fsetpos", 157 | "ftell", 158 | "fwrite", 159 | "gcvt", 160 | "getc", 161 | "getchar", 162 | "getenv", 163 | "gets", 164 | "getw", 165 | "gmtime", 166 | "isalnum", 167 | "isalpha", 168 | "iscntrl", 169 | "isdigit", 170 | "isgraph", 171 | "islower", 172 | "isprint", 173 | "ispunct", 174 | "isspace", 175 | "isupper", 176 | "isxdigit", 177 | "itoa", 178 | "labs", 179 | "ldexp", 180 | "ldiv", 181 | "lfind", 182 | "localtime", 183 | "log", 184 | "log10", 185 | "lsearch", 186 | "ltoa", 187 | "malloc", 188 | "max", 189 | "memchr", 190 | "memcmp", 191 | "memcpy", 192 | "memmove", 193 | "memset", 194 | "min", 195 | "mktime", 196 | "modf", 197 | "offsetof", 198 | "perror", 199 | "pow", 200 | "printf", 201 | "putc", 202 | "putchar", 203 | "putenv", 204 | "puts", 205 | "putw", 206 | "qsort", 207 | "raise", 208 | "rand", 209 | "realloc", 210 | "remove", 211 | "rename", 212 | "rewind", 213 | "scanf", 214 | "setbuf", 215 | "setvbuf", 216 | "signal", 217 | "sin", 218 | "sinh", 219 | "sprintf", 220 | "sqrt", 221 | "srand", 222 | "sscanf", 223 | "strcat", 224 | "strchr", 225 | "strcmp", 226 | "strcoll", 227 | "strcpy", 228 | "strcspn", 229 | "strerror", 230 | "strftime", 231 | "strlen", 232 | "strncat", 233 | "strncmp", 234 | "strncpy", 235 | "strpbrk", 236 | "strrchr", 237 | "strspn", 238 | "strstr", 239 | "strtod", 240 | "strtok", 241 | "strtol", 242 | "strtoul", 243 | "strxfrm", 244 | "swab", 245 | "system", 246 | "tan", 247 | "tanh", 248 | "time", 249 | "tmpfile", 250 | "tmpnam", 251 | "tolower", 252 | "toupper", 253 | "ultoa", 254 | "ungetc", 255 | "va_arg", 256 | "va_end", 257 | "va_start", 258 | "vfprintf", 259 | "vprintf", 260 | "vsprintf" 261 | ] 262 | }, 263 | { 264 | "name": "c.preprocessor.directives", 265 | "strings": [ 266 | { "string": "include <", "append": "${1:filename}>" }, 267 | { "string": "include \"", "append": "${1:filename}\"" }, 268 | 269 | "if", 270 | "ifdef", 271 | "ifndef", 272 | "elif", 273 | "else", 274 | 275 | "define", 276 | "undef", 277 | 278 | "pragma", 279 | 280 | "error", 281 | "warning" 282 | ] 283 | } 284 | ], 285 | 286 | "contexts": [ 287 | { 288 | "description": "Control keywords", 289 | "scope": "(source.c | source.c++ | source.objc | source.objc++) - comment - string", 290 | "pattern": "(?<!\\.|\\[|\\(|,|@)\\b([a-zA-Z]+)", 291 | "completionCaptureIndex": 1, 292 | "completionSetNames": [ 293 | "c.keywords.control" 294 | ] 295 | }, 296 | { 297 | "description": "else if keyword", 298 | "scope": "(source.c | source.c++ | source.objc | source.objc++) - comment - string", 299 | "pattern": "(?<!\\.|\\[|\\(|,|@)\\b(e[lse if]*)", 300 | "completionCaptureIndex": 1, 301 | "completionSetNames": [ 302 | "c.keywords.control.else-if" 303 | ] 304 | }, 305 | { 306 | "description": "Preprocessor directives", 307 | "scope": "(source.c | source.c++ | source.objc | source.objc++) - comment - string", 308 | "pattern": "\\s*#([a-zA-Z]*)", 309 | "completionCaptureIndex": 1, 310 | "completionSetNames": [ 311 | "c.preprocessor.directives" 312 | ] 313 | }, 314 | { 315 | "description": "Non-control keywords", 316 | "scope": "(source.c | source.c++ | source.objc | source.objc++) - comment - string", 317 | "pattern": "(?<!\\.|@)\\b([a-zA-Z]+)", 318 | "completionCaptureIndex": 1, 319 | "completionSetNames": [ 320 | "c.keywords.structures", 321 | "c.keywords.operators", 322 | "c.keywords.dataTypes", 323 | "c.keywords.storageClasses", 324 | "c.keywords.typeQualifiers", 325 | "c.functions", 326 | "c.constants" 327 | ] 328 | } 329 | ] 330 | } -------------------------------------------------------------------------------- /CodeCompletion/objc.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Textastic Code Completion for Objective-C", 3 | "uuid": "47515B2B-A583-4409-9B4E-1D97930AA4EE", 4 | 5 | "completionSets": [ 6 | { 7 | "name": "objc.keywords.exceptions", 8 | "defaultAppend": "", 9 | 10 | "strings": [ 11 | { "string": "try", "append": " {\n\t$0\n}\n" }, 12 | { "string": "try-catch", "replace": "try {\n\t${1:statements}\n} @catch (${2:NSException *exception}) {\n\t${3:handler}\n}\n" }, 13 | { "string": "try-catch-finally", "replace": "try {\n\t${1:statements}\n} @catch (${2:NSException *exception}) {\n\t${3:handler}\n} @finally {\n\t${4:statements}\n}\n" }, 14 | { "string": "catch", "append": " (${1:NSException *exception}) {\n\t${3:handler}\n}\n" }, 15 | { "string": "finally", "append": " {\n\t$0\n}\n" }, 16 | { "string": "throw", "append": " ${0:expression}" } 17 | ] 18 | }, 19 | { 20 | "name": "objc.keywords.allocation", 21 | "defaultAppend": "", 22 | 23 | "strings": [ 24 | "alloc", 25 | "autorelease", 26 | "retain", 27 | "release", 28 | "assign", 29 | "strong", 30 | "weak", 31 | "unsafe_unretained" 32 | ] 33 | }, 34 | { 35 | "name": "objc.keywords.dataTypes", 36 | "defaultAppend": "", 37 | 38 | "strings": [ 39 | "BOOL" 40 | ] 41 | }, 42 | { 43 | "name": "objc.constants", 44 | "defaultAppend": "", 45 | 46 | "strings": [ 47 | "NO", 48 | "YES", 49 | "nil" 50 | ] 51 | }, 52 | { 53 | "name": "objc.preprocessor.directives", 54 | "strings": [ 55 | { "string": "import <", "append": "${1:filename}>\n" }, 56 | { "string": "import \"", "append": "${1:filename}\"\n" } 57 | ] 58 | }, 59 | { 60 | "name": "objc.keywords.class_definition", 61 | "defaultAppend": "\n", 62 | 63 | "strings": [ 64 | { "string": "interface", "append": " ${1:ClassName}: ${2:NSObject} ${3:<Protocol>}\n\n$0\n\n@end\n" }, 65 | 66 | "end", 67 | "implementation", 68 | 69 | "private", 70 | "protected", 71 | "public", 72 | "package" 73 | ] 74 | }, 75 | { 76 | "name": "objc.keywords.protocol_definition", 77 | "defaultAppend": "", 78 | 79 | "strings": [ 80 | { "string": "protocol", "append": " ${1:ProtocolName} ${2:<NSObject>}\n\n${0:methods}\n\n@end\n" }, 81 | 82 | "required", 83 | "optional" 84 | ] 85 | }, 86 | { 87 | "name": "objc.keywords.property_definition", 88 | "defaultAppend": "", 89 | 90 | "strings": [ 91 | { "string": "property", "append": " (${1:nonatomic,} ${2:assign}) ${3:type} ${4:name};" }, 92 | { "string": "synthesize", "append": " ${1:property};" }, 93 | "dynamic" 94 | ] 95 | }, 96 | { 97 | "name": "objc.keywords.other", 98 | "defaultAppend": "", 99 | 100 | "strings": [ 101 | { "string": "class", "append": " $1;" }, 102 | { "string": "encode", "append": "(${1:type_spec});" }, 103 | { "string": "selector", "append": "(${1:arg})" }, 104 | { "string": "autoreleasepool", "append": "{\n\t$0\n}"} 105 | ] 106 | }, 107 | { 108 | "name": "objc.classes", 109 | "strings": [ 110 | "NSAffineTransform", 111 | "NSAllHashTableObjects", 112 | "NSAllMapTableKeys", 113 | "NSAllMapTableValues", 114 | "NSAllocateCollectable", 115 | "NSAllocateMemoryPages", 116 | "NSAllocateObject", 117 | "NSAppleEventDescriptor", 118 | "NSAppleEventManager", 119 | "NSAppleEventManagerSuspensionID", 120 | "NSAppleScript", 121 | "NSArchiver", 122 | "NSArray", 123 | "NSAssert", 124 | "NSAssert1", 125 | "NSAssert2", 126 | "NSAssert3", 127 | "NSAssert4", 128 | "NSAssert5", 129 | "NSAssertionHandler", 130 | "NSAttributedString", 131 | "NSAutoreleasePool", 132 | "NSBlockOperation", 133 | "NSBundle", 134 | "NSByteOrder", 135 | "NSCAssert", 136 | "NSCAssert1", 137 | "NSCAssert2", 138 | "NSCAssert3", 139 | "NSCAssert4", 140 | "NSCAssert5", 141 | "NSCParameterAssert", 142 | "NSCachedURLResponse", 143 | "NSCalendar", 144 | "NSCharacterSet", 145 | "NSClassDescription", 146 | "NSClassFromString", 147 | "NSCloneCommand", 148 | "NSCloseCommand", 149 | "NSCocoaErrorDomain", 150 | "NSCoder", 151 | "NSCoding", 152 | "NSCollectorDisabledOption", 153 | "NSComparator", 154 | "NSCompareHashTables", 155 | "NSCompareMapTables", 156 | "NSComparisonMethods", 157 | "NSComparisonPredicate", 158 | "NSComparisonResult", 159 | "NSCompoundPredicate", 160 | "NSCondition", 161 | "NSConditionLock", 162 | "NSConnection", 163 | "NSConnectionDelegate", 164 | "NSContainsRect", 165 | "NSConvertHostDoubleToSwapped", 166 | "NSConvertHostFloatToSwapped", 167 | "NSConvertSwappedDoubleToHost", 168 | "NSConvertSwappedFloatToHost", 169 | "NSCopyHashTableWithZone", 170 | "NSCopyMapTableWithZone", 171 | "NSCopyMemoryPages", 172 | "NSCopyObject", 173 | "NSCopying", 174 | "NSCountCommand", 175 | "NSCountHashTable", 176 | "NSCountMapTable", 177 | "NSCountedSet", 178 | "NSCreateCommand", 179 | "NSCreateHashTable", 180 | "NSCreateHashTableWithZone", 181 | "NSCreateMapTable", 182 | "NSCreateMapTableWithZone", 183 | "NSCreateZone", 184 | "NSData", 185 | "NSDate", 186 | "NSDateComponents", 187 | "NSDateFormatter", 188 | "NSDeallocateMemoryPages", 189 | "NSDeallocateObject", 190 | "NSDecimal", 191 | "NSDecimalAdd", 192 | "NSDecimalCompact", 193 | "NSDecimalCompare", 194 | "NSDecimalCopy", 195 | "NSDecimalDivide", 196 | "NSDecimalIsNotANumber", 197 | "NSDecimalMaxSize", 198 | "NSDecimalMultiply", 199 | "NSDecimalMultiplyByPowerOf10", 200 | "NSDecimalNoScale", 201 | "NSDecimalNormalize", 202 | "NSDecimalNumber", 203 | "NSDecimalNumberBehaviors", 204 | "NSDecimalNumberHandler", 205 | "NSDecimalPower", 206 | "NSDecimalRound", 207 | "NSDecimalString", 208 | "NSDecimalSubtract", 209 | "NSDecrementExtraRefCountWasZero", 210 | "NSDefaultMallocZone", 211 | "NSDeleteCommand", 212 | "NSDeserializer", 213 | "NSDestinationInvalidException", 214 | "NSDictionary", 215 | "NSDirectoryEnumerator", 216 | "NSDistantObject", 217 | "NSDistantObjectRequest", 218 | "NSDistributedLock", 219 | "NSDistributedNotificationCenter", 220 | "NSDivideRect", 221 | "NSEndHashTableEnumeration", 222 | "NSEndMapTableEnumeration", 223 | "NSEnumerateHashTable", 224 | "NSEnumerateMapTable", 225 | "NSEnumerationConcurrent", 226 | "NSEnumerationOptions", 227 | "NSEnumerationReverse", 228 | "NSEnumerator", 229 | "NSEqualPoints", 230 | "NSEqualRanges", 231 | "NSEqualRects", 232 | "NSEqualSizes", 233 | "NSError", 234 | "NSErrorRecoveryAttempting", 235 | "NSException", 236 | "NSExecutableArchitectureMismatchError", 237 | "NSExecutableErrorMaximum", 238 | "NSExecutableErrorMinimum", 239 | "NSExecutableLinkError", 240 | "NSExecutableLoadError", 241 | "NSExecutableNotLoadableError", 242 | "NSExecutableRuntimeMismatchError", 243 | "NSExistsCommand", 244 | "NSExpression", 245 | "NSExtraRefCount", 246 | "NSFastEnumeration", 247 | "NSFileErrorMaximum", 248 | "NSFileErrorMinimum", 249 | "NSFileHandle", 250 | "NSFileLockingError", 251 | "NSFileManager", 252 | "NSFileNoSuchFileError", 253 | "NSFileReadCorruptFileError", 254 | "NSFileReadInapplicableStringEncodingError", 255 | "NSFileReadInvalidFileNameError", 256 | "NSFileReadNoPermissionError", 257 | "NSFileReadNoSuchFileError", 258 | "NSFileReadTooLargeError", 259 | "NSFileReadUnknownError", 260 | "NSFileReadUnknownStringEncodingError", 261 | "NSFileReadUnsupportedSchemeError", 262 | "NSFileTypeForHFSTypeCode", 263 | "NSFileWriteInapplicableStringEncodingError", 264 | "NSFileWriteInvalidFileNameError", 265 | "NSFileWriteNoPermissionError", 266 | "NSFileWriteOutOfSpaceError", 267 | "NSFileWriteUnknownError", 268 | "NSFileWriteUnsupportedSchemeError", 269 | "NSFileWriteVolumeReadOnlyError", 270 | "NSFormatter", 271 | "NSFormattingError", 272 | "NSFormattingErrorMaximum", 273 | "NSFormattingErrorMinimum", 274 | "NSFoundationVersionNumber", 275 | "NSFreeHashTable", 276 | "NSFreeMapTable", 277 | "NSFullUserName", 278 | "NSGarbageCollector", 279 | "NSGenericException", 280 | "NSGetCommand", 281 | "NSGetSizeAndAlignment", 282 | "NSGetUncaughtExceptionHandler", 283 | "NSHFSTypeCodeFromFileType", 284 | "NSHFSTypeOfFile", 285 | "NSHTTPCookie", 286 | "NSHTTPCookieStorage", 287 | "NSHTTPURLResponse", 288 | "NSHashEnumerator", 289 | "NSHashGet", 290 | "NSHashInsert", 291 | "NSHashInsertIfAbsent", 292 | "NSHashInsertKnownAbsent", 293 | "NSHashRemove", 294 | "NSHashTable", 295 | "NSHashTableCallBacks", 296 | "NSHashTableOptions", 297 | "NSHeight", 298 | "NSHomeDirectory", 299 | "NSHomeDirectoryForUser", 300 | "NSHost", 301 | "NSHostByteOrder", 302 | "NSIncrementExtraRefCount", 303 | "NSIndexPath", 304 | "NSIndexSet", 305 | "NSIndexSpecifier", 306 | "NSInputStream", 307 | "NSInsetRect", 308 | "NSIntHashCallBacks", 309 | "NSIntMapKeyCallBacks", 310 | "NSIntMapValueCallBacks", 311 | "NSInteger", 312 | "NSIntegerHashCallBacks", 313 | "NSIntegerMapKeyCallBacks", 314 | "NSIntegerMapValueCallBacks", 315 | "NSIntegerMax", 316 | "NSIntegerMin", 317 | "NSIntegralRect", 318 | "NSInternalInconsistencyException", 319 | "NSIntersectionRange", 320 | "NSIntersectionRect", 321 | "NSIntersectsRect", 322 | "NSInvalidArgumentException", 323 | "NSInvalidReceivePortException", 324 | "NSInvalidSendPortException", 325 | "NSInvocation", 326 | "NSInvocationOperation", 327 | "NSIsEmptyRect", 328 | "NSJavaBundleCleanup", 329 | "NSJavaBundleSetup", 330 | "NSJavaClasses", 331 | "NSJavaClassesForBundle", 332 | "NSJavaClassesFromPath", 333 | "NSJavaDidCreateVirtualMachineNotification", 334 | "NSJavaDidSetupVirtualMachineNotification", 335 | "NSJavaLibraryPath", 336 | "NSJavaNeedsToLoadClasses", 337 | "NSJavaNeedsVirtualMachine", 338 | "NSJavaObjectNamedInPath", 339 | "NSJavaOwnVirtualMachine", 340 | "NSJavaPath", 341 | "NSJavaPathSeparator", 342 | "NSJavaProvidesClasses", 343 | "NSJavaRoot", 344 | "NSJavaSetup", 345 | "NSJavaSetupVirtualMachine", 346 | "NSJavaUserPath", 347 | "NSJavaWillCreateVirtualMachineNotification", 348 | "NSJavaWillSetupVirtualMachineNotification", 349 | "NSKeyValueCoding", 350 | "NSKeyValueObserving", 351 | "NSKeyValueValidationError", 352 | "NSKeyedArchiver", 353 | "NSKeyedArchiverDelegate", 354 | "NSKeyedUnarchiver", 355 | "NSKeyedUnarchiverDelegate", 356 | "NSLocale", 357 | "NSLocalizedString", 358 | "NSLocalizedStringFromTable", 359 | "NSLocalizedStringFromTableInBundle", 360 | "NSLocalizedStringWithDefaultValue", 361 | "NSLocationInRange", 362 | "NSLock", 363 | "NSLocking", 364 | "NSLog", 365 | "NSLogPageSize", 366 | "NSLogicalTest", 367 | "NSLogv", 368 | "NSMachBootstrapServer", 369 | "NSMachPort", 370 | "NSMachPortDelegate", 371 | "NSMakeCollectable", 372 | "NSMakePoint", 373 | "NSMakeRange", 374 | "NSMakeRect", 375 | "NSMakeSize", 376 | "NSMallocException", 377 | "NSMapEnumerator", 378 | "NSMapGet", 379 | "NSMapInsert", 380 | "NSMapInsertIfAbsent", 381 | "NSMapInsertKnownAbsent", 382 | "NSMapMember", 383 | "NSMapRemove", 384 | "NSMapTable", 385 | "NSMapTableKeyCallBacks", 386 | "NSMapTableOptions", 387 | "NSMapTableValueCallBacks", 388 | "NSMaxRange", 389 | "NSMaxX", 390 | "NSMaxY", 391 | "NSMessagePort", 392 | "NSMessagePortNameServer", 393 | "NSMetadataItem", 394 | "NSMetadataQuery", 395 | "NSMetadataQueryAttributeValueTuple", 396 | "NSMetadataQueryDelegate", 397 | "NSMetadataQueryResultGroup", 398 | "NSMethodSignature", 399 | "NSMidX", 400 | "NSMidY", 401 | "NSMiddleSpecifier", 402 | "NSMinX", 403 | "NSMinY", 404 | "NSMouseInRect", 405 | "NSMoveCommand", 406 | "NSMutableArray", 407 | "NSMutableAttributedString", 408 | "NSMutableCharacterSet", 409 | "NSMutableCopying", 410 | "NSMutableData", 411 | "NSMutableDictionary", 412 | "NSMutableIndexSet", 413 | "NSMutableSet", 414 | "NSMutableString", 415 | "NSMutableURLRequest", 416 | "NSNameSpecifier", 417 | "NSNetService", 418 | "NSNetServiceBrowser", 419 | "NSNetServiceBrowserDelegate", 420 | "NSNetServiceDelegate", 421 | "NSNextHashEnumeratorItem", 422 | "NSNextMapEnumeratorPair", 423 | "NSNonOwnedPointerHashCallBacks", 424 | "NSNonOwnedPointerMapKeyCallBacks", 425 | "NSNonOwnedPointerMapValueCallBacks", 426 | "NSNonOwnedPointerOrNullMapKeyCallBacks", 427 | "NSNonRetainedObjectHashCallBacks", 428 | "NSNonRetainedObjectMapKeyCallBacks", 429 | "NSNonRetainedObjectMapValueCallBacks", 430 | "NSNotAPointerMapKey", 431 | "NSNotAnIntMapKey", 432 | "NSNotAnIntegerMapKey", 433 | "NSNotFound", 434 | "NSNotification", 435 | "NSNotificationCenter", 436 | "NSNotificationQueue", 437 | "NSNull", 438 | "NSNumber", 439 | "NSNumberFormatter", 440 | "NSObjCTypeSerializationCallBack", 441 | "NSObject", 442 | "NSObject", 443 | "NSObjectHashCallBacks", 444 | "NSObjectInaccessibleException", 445 | "NSObjectMapKeyCallBacks", 446 | "NSObjectMapValueCallBacks", 447 | "NSObjectNotAvailableException", 448 | "NSOffsetRect", 449 | "NSOldStyleException", 450 | "NSOpenStepRootDirectory", 451 | "NSOperation", 452 | "NSOperationQueue", 453 | "NSOrthography", 454 | "NSOutputStream", 455 | "NSOwnedObjectIdentityHashCallBacks", 456 | "NSOwnedPointerHashCallBacks", 457 | "NSOwnedPointerMapKeyCallBacks", 458 | "NSOwnedPointerMapValueCallBacks", 459 | "NSPageSize", 460 | "NSParameterAssert", 461 | "NSPipe", 462 | "NSPoint", 463 | "NSPointArray", 464 | "NSPointFromCGPoint", 465 | "NSPointFromString", 466 | "NSPointInRect", 467 | "NSPointPointer", 468 | "NSPointToCGPoint", 469 | "NSPointerArray", 470 | "NSPointerFunctions", 471 | "NSPointerToStructHashCallBacks", 472 | "NSPort", 473 | "NSPortCoder", 474 | "NSPortDelegate", 475 | "NSPortMessage", 476 | "NSPortNameServer", 477 | "NSPortReceiveException", 478 | "NSPortSendException", 479 | "NSPortTimeoutException", 480 | "NSPositionalSpecifier", 481 | "NSPredicate", 482 | "NSProcessInfo", 483 | "NSPropertyListErrorMaximum", 484 | "NSPropertyListErrorMinimum", 485 | "NSPropertyListReadCorruptError", 486 | "NSPropertyListReadStreamError", 487 | "NSPropertyListReadUnknownVersionError", 488 | "NSPropertyListSerialization", 489 | "NSPropertyListWriteStreamError", 490 | "NSPropertySpecifier", 491 | "NSProtocolChecker", 492 | "NSProtocolFromString", 493 | "NSProxy", 494 | "NSQuitCommand", 495 | "NSRandomSpecifier", 496 | "NSRange", 497 | "NSRangeException", 498 | "NSRangeFromString", 499 | "NSRangePointer", 500 | "NSRangeSpecifier", 501 | "NSRealMemoryAvailable", 502 | "NSReallocateCollectable", 503 | "NSRect", 504 | "NSRectArray", 505 | "NSRectEdge", 506 | "NSRectFromCGRect", 507 | "NSRectFromString", 508 | "NSRectPointer", 509 | "NSRectToCGRect", 510 | "NSRecursiveLock", 511 | "NSRecycleZone", 512 | "NSRelativeSpecifier", 513 | "NSResetHashTable", 514 | "NSResetMapTable", 515 | "NSRoundDownToMultipleOfPageSize", 516 | "NSRoundUpToMultipleOfPageSize", 517 | "NSRunLoop", 518 | "NSScannedOption", 519 | "NSScanner", 520 | "NSScriptClassDescription", 521 | "NSScriptCoercionHandler", 522 | "NSScriptCommand", 523 | "NSScriptCommandDescription", 524 | "NSScriptExecutionContext", 525 | "NSScriptKeyValueCoding", 526 | "NSScriptObjectSpecifier", 527 | "NSScriptObjectSpecifiers", 528 | "NSScriptSuiteRegistry", 529 | "NSScriptWhoseTest", 530 | "NSScriptingComparisonMethods", 531 | "NSSearchPathDirectory", 532 | "NSSearchPathDomainMask", 533 | "NSSearchPathForDirectoriesInDomains", 534 | "NSSelectorFromString", 535 | "NSSerializer", 536 | "NSSet", 537 | "NSSetCommand", 538 | "NSSetUncaughtExceptionHandler", 539 | "NSSetZoneName", 540 | "NSShouldRetainWithZone", 541 | "NSSize", 542 | "NSSizeArray", 543 | "NSSizeFromCGSize", 544 | "NSSizeFromString", 545 | "NSSizePointer", 546 | "NSSizeToCGSize", 547 | "NSSocketNativeHandle", 548 | "NSSocketPort", 549 | "NSSocketPortNameServer", 550 | "NSSortConcurrent", 551 | "NSSortDescriptor", 552 | "NSSortOptions", 553 | "NSSortStable", 554 | "NSSpecifierTest", 555 | "NSSpellServer", 556 | "NSSpellServerDelegate", 557 | "NSStream", 558 | "NSStreamDelegate", 559 | "NSString", 560 | "NSStringEncoding", 561 | "NSStringFromClass", 562 | "NSStringFromHashTable", 563 | "NSStringFromMapTable", 564 | "NSStringFromPoint", 565 | "NSStringFromProtocol", 566 | "NSStringFromRange", 567 | "NSStringFromRect", 568 | "NSStringFromSelector", 569 | "NSStringFromSize", 570 | "NSSwapBigDoubleToHost", 571 | "NSSwapBigFloatToHost", 572 | "NSSwapBigIntToHost", 573 | "NSSwapBigLongLongToHost", 574 | "NSSwapBigLongToHost", 575 | "NSSwapBigShortToHost", 576 | "NSSwapDouble", 577 | "NSSwapFloat", 578 | "NSSwapHostDoubleToBig", 579 | "NSSwapHostDoubleToLittle", 580 | "NSSwapHostFloatToBig", 581 | "NSSwapHostFloatToLittle", 582 | "NSSwapHostIntToBig", 583 | "NSSwapHostIntToLittle", 584 | "NSSwapHostLongLongToBig", 585 | "NSSwapHostLongLongToLittle", 586 | "NSSwapHostLongToBig", 587 | "NSSwapHostLongToLittle", 588 | "NSSwapHostShortToBig", 589 | "NSSwapHostShortToLittle", 590 | "NSSwapInt", 591 | "NSSwapLittleDoubleToHost", 592 | "NSSwapLittleFloatToHost", 593 | "NSSwapLittleIntToHost", 594 | "NSSwapLittleLongLongToHost", 595 | "NSSwapLittleLongToHost", 596 | "NSSwapLittleShortToHost", 597 | "NSSwapLong", 598 | "NSSwapLongLong", 599 | "NSSwapShort", 600 | "NSSwappedDouble", 601 | "NSSwappedFloat", 602 | "NSTask", 603 | "NSTemporaryDirectory", 604 | "NSTextCheckingResult", 605 | "NSThread", 606 | "NSTimeInterval", 607 | "NSTimeZone", 608 | "NSTimer", 609 | "NSUInteger", 610 | "NSUIntegerMax", 611 | "NSURL", 612 | "NSURLAuthenticationChallenge", 613 | "NSURLAuthenticationChallengeSender", 614 | "NSURLCache", 615 | "NSURLConnection", 616 | "NSURLCredential", 617 | "NSURLCredentialStorage", 618 | "NSURLDownload", 619 | "NSURLErrorBadServerResponse", 620 | "NSURLErrorBadURL", 621 | "NSURLErrorCancelled", 622 | "NSURLErrorCannotCloseFile", 623 | "NSURLErrorCannotConnectToHost", 624 | "NSURLErrorCannotCreateFile", 625 | "NSURLErrorCannotFindHost", 626 | "NSURLErrorCannotLoadFromNetwork", 627 | "NSURLErrorCannotMoveFile", 628 | "NSURLErrorCannotOpenFile", 629 | "NSURLErrorCannotRemoveFile", 630 | "NSURLErrorCannotWriteToFile", 631 | "NSURLErrorClientCertificateRejected", 632 | "NSURLErrorDNSLookupFailed", 633 | "NSURLErrorDataLengthExceedsMaximum", 634 | "NSURLErrorDomain", 635 | "NSURLErrorDownloadDecodingFailedMidStream", 636 | "NSURLErrorDownloadDecodingFailedToComplete", 637 | "NSURLErrorFileDoesNotExist", 638 | "NSURLErrorFileIsDirectory", 639 | "NSURLErrorHTTPTooManyRedirects", 640 | "NSURLErrorNetworkConnectionLost", 641 | "NSURLErrorNoPermissionsToReadFile", 642 | "NSURLErrorNotConnectedToInternet", 643 | "NSURLErrorRedirectToNonExistentLocation", 644 | "NSURLErrorResourceUnavailable", 645 | "NSURLErrorSecureConnectionFailed", 646 | "NSURLErrorServerCertificateHasBadDate", 647 | "NSURLErrorServerCertificateHasUnknownRoot", 648 | "NSURLErrorServerCertificateNotYetValid", 649 | "NSURLErrorServerCertificateUntrusted", 650 | "NSURLErrorTimedOut", 651 | "NSURLErrorUnknown", 652 | "NSURLErrorUnsupportedURL", 653 | "NSURLErrorUserAuthenticationRequired", 654 | "NSURLErrorUserCancelledAuthentication", 655 | "NSURLErrorZeroByteResource", 656 | "NSURLHandle", 657 | "NSURLHandleClient", 658 | "NSURLProtectionSpace", 659 | "NSURLProtocol", 660 | "NSURLProtocolClient", 661 | "NSURLRequest", 662 | "NSURLResponse", 663 | "NSUnarchiver", 664 | "NSUncaughtExceptionHandler", 665 | "NSUndoManager", 666 | "NSUnionRange", 667 | "NSUnionRect", 668 | "NSUniqueIDSpecifier", 669 | "NSUserCancelledError", 670 | "NSUserDefaults", 671 | "NSUserName", 672 | "NSValidationErrorMaximum", 673 | "NSValidationErrorMinimum", 674 | "NSValue", 675 | "NSValueTransformer", 676 | "NSWhoseSpecifier", 677 | "NSWidth", 678 | "NSXMLDTD", 679 | "NSXMLDTDNode", 680 | "NSXMLDocument", 681 | "NSXMLElement", 682 | "NSXMLNode", 683 | "NSXMLParser", 684 | "NSXMLParserDelegate", 685 | "NSZeroPoint", 686 | "NSZeroRect", 687 | "NSZeroSize", 688 | "NSZone", 689 | "NSZoneCalloc", 690 | "NSZoneFree", 691 | "NSZoneFromPointer", 692 | "NSZoneMalloc", 693 | "NSZoneName", 694 | "NSZoneRealloc", 695 | "NS_DURING", 696 | "NS_ENDHANDLER", 697 | "NS_HANDLER", 698 | "NS_VALUERETURN", 699 | "NS_VOIDRETURN" 700 | ] 701 | } 702 | ], 703 | 704 | "contexts": [ 705 | { 706 | "description": "Preprocessor directives", 707 | "scope": "(source.objc | source.objc++) - comment - string", 708 | "pattern": "\\s*#([a-zA-Z]*)", 709 | "completionCaptureIndex": 1, 710 | "completionSetNames": [ 711 | "objc.preprocessor.directives" 712 | ] 713 | }, 714 | { 715 | "description": "Objective-C @ keywords", 716 | "scope": "(source.objc | source.objc++) - comment - string", 717 | "pattern": "(?<!\\.)@([a-zA-Z]*)", 718 | "completionCaptureIndex": 1, 719 | "completionSetNames": [ 720 | "objc.keywords.exceptions", 721 | "objc.keywords.class_definition", 722 | "objc.keywords.property_definition", 723 | "objc.keywords.protocol_definition", 724 | "objc.keywords.other" 725 | ] 726 | }, 727 | { 728 | "description": "Non-control keywords", 729 | "scope": "(source.objc | source.objc++) - comment - string", 730 | "pattern": "(?<!\\.|@)\\b([a-zA-Z]+)", 731 | "completionCaptureIndex": 1, 732 | "completionSetNames": [ 733 | "objc.keywords.dataTypes", 734 | "objc.keywords.allocation", 735 | "objc.constants", 736 | "objc.classes" 737 | ] 738 | } 739 | ] 740 | } -------------------------------------------------------------------------------- /CodeCompletion/html.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Textastic Code Completion for HTML Tags and Attributes", 3 | "uuid": "928A838C-F861-4902-92B8-58C29FCFC077", 4 | 5 | "completionSets": [ 6 | { 7 | "name": "html.tags.with-newline", 8 | "defaultAppend": ">\n$0\n</$COMPLETION>", 9 | "strings": [ 10 | "html", 11 | "body", 12 | "head" 13 | ] 14 | }, 15 | { 16 | "name": "html.tags", 17 | "defaultAppend": ">$0</$COMPLETION>", 18 | "strings": [ 19 | { 20 | "string": "a", 21 | "append": " href=\"$1\">$2</a>$0" 22 | }, 23 | { 24 | "string": "form", 25 | "append": " method=\"${1:post}\" action=\"$2\">$0</form>" 26 | }, 27 | { 28 | "string": "label", 29 | "append": "${1: for=\"$2\"}>$0</label>" 30 | }, 31 | { 32 | "string": "span", 33 | "append": "${1: class=\"$2\"}>$0</span>" 34 | }, 35 | { 36 | "string": "div", 37 | "append": "${1: id=\"$2\"}>$0</div>" 38 | }, 39 | { 40 | "string": "canvas", 41 | "append": " id=\"${1:canvas-id}\" width=\"${2:0}\" height=\"${3:0}\">$0</canvas>" 42 | }, 43 | "abbr", 44 | "acronym", 45 | "address", 46 | "applet", 47 | "area", 48 | "b", 49 | "base", 50 | "bdo", 51 | "blockquote", 52 | "button", 53 | "caption", 54 | "center", 55 | "cite", 56 | "code", 57 | "colgroup", 58 | "dd", 59 | "del", 60 | "dfn", 61 | "dir", 62 | "dl", 63 | "dt", 64 | "em", 65 | "fieldset", 66 | "frame", 67 | "frameset", 68 | "h1", 69 | "h2", 70 | "h3", 71 | "h4", 72 | "h5", 73 | "h6", 74 | "i", 75 | "iframe", 76 | "ins", 77 | "kbd", 78 | "legend", 79 | "li", 80 | "map", 81 | "menu", 82 | "noframes", 83 | "noscript", 84 | "object", 85 | "ol", 86 | "optgroup", 87 | "option", 88 | "p", 89 | "param", 90 | "pre", 91 | "q", 92 | "samp", 93 | "script", 94 | "select", 95 | "small", 96 | "strike", 97 | "strong", 98 | "style", 99 | "sub", 100 | "sup", 101 | "table", 102 | "tbody", 103 | "td", 104 | "textarea", 105 | "tfoot", 106 | "th", 107 | "thead", 108 | "title", 109 | "tr", 110 | "tt", 111 | "u", 112 | "ul", 113 | "var" 114 | ] 115 | }, 116 | { 117 | "name": "html.tags.html5", 118 | "defaultAppend": ">$0</$COMPLETION>", 119 | "strings": [ 120 | "article", 121 | "aside", 122 | { 123 | "string": "audio", 124 | "append": " src=\"$1\"${2: preload=\"${3:none}\"}${4: controls}>$0</audio>" 125 | }, 126 | "bdi", 127 | "command", 128 | "datalist", 129 | "details", 130 | "embed", 131 | "figcaption", 132 | "figure", 133 | "footer", 134 | "header", 135 | "hgroup", 136 | "keygen", 137 | "main", 138 | "mark", 139 | "meter", 140 | "nav", 141 | "output", 142 | "progress", 143 | "rp", 144 | "rt", 145 | "ruby", 146 | "samp", 147 | "section", 148 | { 149 | "string": "source", 150 | "append": " src=\"$1\" type=\"$2\" />$0" 151 | }, 152 | "summary", 153 | "time", 154 | "track", 155 | { 156 | "string": "video", 157 | "append": " src=\"$1\"${2: preload=\"${3:none}\"}${4: controls}>$0</video>" 158 | } 159 | ] 160 | }, 161 | { 162 | "name": "html.tags.self-closing", 163 | "defaultAppend": " />", 164 | "strings": [ 165 | { 166 | "string": "img", 167 | "append": " src=\"$1\" $2/>$0" 168 | }, 169 | { 170 | "string": "meta", 171 | "append": "${1: http-equiv=\"$2\" content=\"$3\"} />" 172 | }, 173 | { 174 | "string": "link", 175 | "append": " rel=\"$1\" href=\"$2\" type=\"$3\" $4/>$0" 176 | }, 177 | { 178 | "string": "input", 179 | "append": " type=\"$1\" name=\"$2\" value=\"$3\" />$0" 180 | }, 181 | "br", 182 | "col", 183 | "hr", 184 | "wbr" 185 | ] 186 | }, 187 | 188 | // Global attributes 189 | { 190 | "name": "html.tags.standard-attributes", 191 | "defaultAppend": "=\"$1\"$0", 192 | "strings": [ 193 | "accesskey", 194 | "class", 195 | "id", 196 | "style", 197 | "tabindex", 198 | "title" 199 | ] 200 | }, 201 | { 202 | "name": "html.tags.event-attributes", 203 | "defaultAppend": "=\"$1\"$0", 204 | "strings": [ 205 | "onfocus", 206 | "onblur", 207 | "onclick", 208 | "ondblclick", 209 | "onmousedown", 210 | "onmouseup", 211 | "onmouseover", 212 | "onmousemove", 213 | "onmouseout", 214 | "onkeypress", 215 | "onkeydown", 216 | "onkeyup" 217 | ] 218 | }, 219 | 220 | // Attributes of specific tags 221 | { 222 | "name": "html.tags.a.attributes", 223 | "defaultAppend": "=\"$1\"$0", 224 | "strings": [ 225 | "href", 226 | "hreflang", 227 | "name", 228 | "rel", 229 | "target", 230 | // HTML5 231 | "media", 232 | "ping", 233 | "type" 234 | ] 235 | }, 236 | { 237 | "name": "html.tags.applet.attributes", 238 | "defaultAppend": "=\"$1\"$0", 239 | "strings": [ 240 | "height", 241 | "width", 242 | "align", 243 | "alt", 244 | "archive", 245 | "code", 246 | "codebase", 247 | "hspace", 248 | "name", 249 | "object", 250 | "vspace" 251 | ] 252 | }, 253 | { 254 | "name": "html.tags.area.attributes", 255 | "defaultAppend": "=\"$1\"$0", 256 | "strings": [ 257 | "alt", 258 | "coords", 259 | "href", 260 | "nohref", 261 | "shape", 262 | "target", 263 | // HTML5 264 | "ping", 265 | "rel", 266 | "media", 267 | "hreflang", 268 | "type" 269 | ] 270 | }, 271 | 272 | // HTML5 273 | { 274 | "name": "html.tags.audio.attributes", 275 | "defaultAppend": "=\"$1\"$0", 276 | "strings": [ 277 | "src", 278 | "preload", 279 | "autoplay", 280 | "controls", 281 | "loop" 282 | ] 283 | }, 284 | 285 | { 286 | "name": "html.tags.base.attributes", 287 | "defaultAppend": "=\"$1\"$0", 288 | "strings": [ 289 | "href", 290 | "target" 291 | ] 292 | }, 293 | 294 | { 295 | "name": "html.tags.bdo.attributes", 296 | "defaultAppend": "=\"$1\"$0", 297 | "strings": [ 298 | "dir" 299 | ] 300 | }, 301 | 302 | { 303 | "name": "html.tags.blockquote.attributes", 304 | "defaultAppend": "=\"$1\"$0", 305 | "strings": [ 306 | "cite" 307 | ] 308 | }, 309 | 310 | { 311 | "name": "html.tags.button.attributes", 312 | "defaultAppend": "=\"$1\"$0", 313 | "strings": [ 314 | "disabled", 315 | "name", 316 | "type", 317 | "value", 318 | // HTML5 319 | "autofocus", 320 | "form", 321 | "formaction", 322 | "formenctype", 323 | "formmethod", 324 | "formnovalidate", 325 | "formtarget" 326 | ] 327 | }, 328 | 329 | { 330 | "name": "html.tags.canvas.attributes", 331 | "defaultAppend": "=\"$1\"$0", 332 | "strings": [ 333 | "width", 334 | "height" 335 | ] 336 | }, 337 | 338 | { 339 | "name": "html.tags.col.attributes", 340 | "defaultAppend": "=\"$1\"$0", 341 | "strings": [ 342 | "align", 343 | "char", 344 | "charoff", 345 | "span", 346 | "valign", 347 | "width" 348 | ] 349 | }, 350 | 351 | { 352 | "name": "html.tags.colgroup.attributes", 353 | "defaultAppend": "=\"$1\"$0", 354 | "strings": [ 355 | "align", 356 | "char", 357 | "charoff", 358 | "span", 359 | "valign", 360 | "width" 361 | ] 362 | }, 363 | 364 | // HTML5 365 | { 366 | "name": "html.tags.command.attributes", 367 | "defaultAppend": "=\"$1\"$0", 368 | "strings": [ 369 | "type", 370 | "label", 371 | "icon", 372 | "disabled", 373 | "checked", 374 | "radiogroup" 375 | ] 376 | }, 377 | 378 | { 379 | "name": "html.tags.del.attributes", 380 | "defaultAppend": "=\"$1\"$0", 381 | "strings": [ 382 | "cite", 383 | "datetime" 384 | ] 385 | }, 386 | 387 | // HTML5 388 | { 389 | "name": "html.tags.details.attributes", 390 | "defaultAppend": "=\"$1\"$0", 391 | "strings": [ 392 | "open" 393 | ] 394 | }, 395 | 396 | // HTML5 397 | { 398 | "name": "html.tags.device.attributes", 399 | "defaultAppend": "=\"$1\"$0", 400 | "strings": [ 401 | "type" 402 | ] 403 | }, 404 | 405 | { 406 | "name": "html.tags.dir.attributes", 407 | "defaultAppend": "=\"$1\"$0", 408 | "strings": [ 409 | "compact" 410 | ] 411 | }, 412 | 413 | // HTML5 414 | { 415 | "name": "html.tags.embed.attributes", 416 | "defaultAppend": "=\"$1\"$0", 417 | "strings": [ 418 | "src", 419 | "type", 420 | "width", 421 | "height" 422 | ] 423 | }, 424 | 425 | // HTML5 426 | { 427 | "name": "html.tags.fieldset.attributes", 428 | "defaultAppend": "=\"$1\"$0", 429 | "strings": [ 430 | "disabled", 431 | "form", 432 | "name" 433 | ] 434 | }, 435 | 436 | // HTML5 437 | { 438 | "name": "html.tags.form.attributes", 439 | "defaultAppend": "=\"$1\"$0", 440 | "strings": [ 441 | "accept-charset", 442 | "action", 443 | "autocomplete", 444 | "enctype", 445 | "method", 446 | "name", 447 | "novalidate", 448 | "target" 449 | ] 450 | }, 451 | 452 | { 453 | "name": "html.tags.frame.attributes", 454 | "defaultAppend": "=\"$1\"$0", 455 | "strings": [ 456 | "frameborder", 457 | "longdesc", 458 | "marginheight", 459 | "marginwidth", 460 | "name", 461 | "noresize", 462 | "scrolling", 463 | "src" 464 | ] 465 | }, 466 | 467 | { 468 | "name": "html.tags.frameset.attributes", 469 | "defaultAppend": "=\"$1\"$0", 470 | "strings": [ 471 | "cols", 472 | "rows" 473 | ] 474 | }, 475 | 476 | { 477 | "name": "html.tags.head.attributes", 478 | "defaultAppend": "=\"$1\"$0", 479 | "strings": [ 480 | "profile" 481 | ] 482 | }, 483 | 484 | { 485 | "name": "html.tags.html.attributes", 486 | "defaultAppend": "=\"$1\"$0", 487 | "strings": [ 488 | "xmlns", 489 | // HTML5 490 | "manifest" 491 | ] 492 | }, 493 | 494 | { 495 | "name": "html.tags.iframe.attributes", 496 | "defaultAppend": "=\"$1\"$0", 497 | "strings": [ 498 | "align", 499 | "frameborder", 500 | "longdesc", 501 | "marginheight", 502 | "marginwidth", 503 | "name", 504 | "noresize", 505 | "scrolling", 506 | "src", 507 | "width", 508 | "height", 509 | // HTML5 510 | "srcdoc", 511 | "sandbox", 512 | "seamless" 513 | ] 514 | }, 515 | 516 | { 517 | "name": "html.tags.img.attributes", 518 | "defaultAppend": "=\"$1\"$0", 519 | "strings": [ 520 | "alt", 521 | "src", 522 | "height", 523 | "width", 524 | "usemap", 525 | "longdesc", 526 | // HTML5 527 | "ismap" 528 | ] 529 | }, 530 | 531 | { 532 | "name": "html.tags.input.attributes", 533 | "defaultAppend": "=\"$1\"$0", 534 | "strings": [ 535 | "accept", 536 | "alt", 537 | "checked", 538 | "disabled", 539 | "maxlength", 540 | "name", 541 | "readonly", 542 | "size", 543 | "src", 544 | "type", 545 | "value", 546 | // HTML5 547 | "autocomplete", 548 | "autofocus", 549 | "form", 550 | "formaction", 551 | "formenctype", 552 | "formmethod", 553 | "formnovalidate", 554 | "formtarget", 555 | "height", 556 | "list", 557 | "max", 558 | "min", 559 | "multiple", 560 | "pattern", 561 | "placeholder", 562 | "required", 563 | "step", 564 | "width" 565 | ] 566 | }, 567 | 568 | { 569 | "name": "html.tags.ins.attributes", 570 | "defaultAppend": "=\"$1\"$0", 571 | "strings": [ 572 | "cite", 573 | "datetime" 574 | ] 575 | }, 576 | 577 | // HTML5 578 | { 579 | "name": "html.tags.keygen.attributes", 580 | "defaultAppend": "=\"$1\"$0", 581 | "strings": [ 582 | "autofocus", 583 | "challenge", 584 | "disabled", 585 | "form", 586 | "keytype", 587 | "name" 588 | ] 589 | }, 590 | 591 | { 592 | "name": "html.tags.label.attributes", 593 | "defaultAppend": "=\"$1\"$0", 594 | "strings": [ 595 | "for", 596 | // HTML5 597 | "form" 598 | ] 599 | }, 600 | 601 | // HTML5 602 | { 603 | "name": "html.tags.li.attributes", 604 | "defaultAppend": "=\"$1\"$0", 605 | "strings": [ 606 | "value" 607 | ] 608 | }, 609 | 610 | { 611 | "name": "html.tags.link.attributes", 612 | "defaultAppend": "=\"$1\"$0", 613 | "strings": [ 614 | "charset", 615 | "href", 616 | "hreflang", 617 | "media", 618 | "rel", 619 | "rev", 620 | "target", 621 | "type", 622 | // HTML5 623 | "sizes" 624 | ] 625 | }, 626 | 627 | { 628 | "name": "html.tags.map.attributes", 629 | "defaultAppend": "=\"$1\"$0", 630 | "strings": [ 631 | "name" 632 | ] 633 | }, 634 | 635 | // HTML5 636 | { 637 | "name": "html.tags.menu.attributes", 638 | "defaultAppend": "=\"$1\"$0", 639 | "strings": [ 640 | "label", 641 | "type" 642 | ] 643 | }, 644 | 645 | { 646 | "name": "html.tags.meta.attributes", 647 | "defaultAppend": "=\"$1\"$0", 648 | "strings": [ 649 | "http-equiv", 650 | "content", 651 | "name", 652 | "scheme", 653 | // HTML5 654 | "charset" 655 | ] 656 | }, 657 | 658 | // HTML5 659 | { 660 | "name": "html.tags.meter.attributes", 661 | "defaultAppend": "=\"$1\"$0", 662 | "strings": [ 663 | "form", 664 | "high", 665 | "low", 666 | "max", 667 | "min", 668 | "optimum", 669 | "value" 670 | ] 671 | }, 672 | 673 | { 674 | "name": "html.tags.object.attributes", 675 | "defaultAppend": "=\"$1\"$0", 676 | "strings": [ 677 | "align", 678 | "archive", 679 | "border", 680 | "classid", 681 | "codebase", 682 | "codetype", 683 | "data", 684 | "declare", 685 | "height", 686 | "name", 687 | "standby", 688 | "type", 689 | "usemap", 690 | "width" 691 | ] 692 | }, 693 | 694 | // HTML5 695 | { 696 | "name": "html.tags.ol.attributes", 697 | "defaultAppend": "=\"$1\"$0", 698 | "strings": [ 699 | "reversed", 700 | "start" 701 | ] 702 | }, 703 | 704 | { 705 | "name": "html.tags.optgroup.attributes", 706 | "defaultAppend": "=\"$1\"$0", 707 | "strings": [ 708 | "label", 709 | "disabled" 710 | ] 711 | }, 712 | 713 | { 714 | "name": "html.tags.option.attributes", 715 | "defaultAppend": "=\"$1\"$0", 716 | "strings": [ 717 | "disabled", 718 | "label", 719 | "selected", 720 | "value" 721 | ] 722 | }, 723 | 724 | // HTML5 725 | { 726 | "name": "html.tags.output.attributes", 727 | "defaultAppend": "=\"$1\"$0", 728 | "strings": [ 729 | "for", 730 | "form", 731 | "name" 732 | ] 733 | }, 734 | 735 | { 736 | "name": "html.tags.param.attributes", 737 | "defaultAppend": "=\"$1\"$0", 738 | "strings": [ 739 | "name", 740 | "type", 741 | "value", 742 | "valuetype" 743 | ] 744 | }, 745 | 746 | // HTML5 747 | { 748 | "name": "html.tags.progress.attributes", 749 | "defaultAppend": "=\"$1\"$0", 750 | "strings": [ 751 | "max", 752 | "value" 753 | ] 754 | }, 755 | 756 | { 757 | "name": "html.tags.q.attributes", 758 | "defaultAppend": "=\"$1\"$0", 759 | "strings": [ 760 | "cite" 761 | ] 762 | }, 763 | 764 | { 765 | "name": "html.tags.script.attributes", 766 | "defaultAppend": "=\"$1\"$0", 767 | "strings": [ 768 | "type", 769 | "charset", 770 | "defer", 771 | "language", 772 | "src", 773 | // HTML5 774 | "async" 775 | ] 776 | }, 777 | 778 | { 779 | "name": "html.tags.select.attributes", 780 | "defaultAppend": "=\"$1\"$0", 781 | "strings": [ 782 | "disabled", 783 | "multiple", 784 | "name", 785 | "size", 786 | // HTML5 787 | "autofocus", 788 | "form" 789 | ] 790 | }, 791 | 792 | // HTML5 793 | { 794 | "name": "html.tags.source.attributes", 795 | "defaultAppend": "=\"$1\"$0", 796 | "strings": [ 797 | "media", 798 | "src", 799 | "type" 800 | ] 801 | }, 802 | 803 | { 804 | "name": "html.tags.style.attributes", 805 | "defaultAppend": "=\"$1\"$0", 806 | "strings": [ 807 | "type", 808 | "media", 809 | // HTML5 810 | "scoped", 811 | "title" 812 | ] 813 | }, 814 | 815 | { 816 | "name": "html.tags.table.attributes", 817 | "defaultAppend": "=\"$1\"$0", 818 | "strings": [ 819 | "border", 820 | "cellpadding", 821 | "cellspacing", 822 | "height", 823 | "frame", 824 | "rules", 825 | "summary", 826 | "width" 827 | ] 828 | }, 829 | 830 | { 831 | "name": "html.tags.tbody.attributes", 832 | "defaultAppend": "=\"$1\"$0", 833 | "strings": [ 834 | "char", 835 | "charoff", 836 | "valign" 837 | ] 838 | }, 839 | 840 | { 841 | "name": "html.tags.td.attributes", 842 | "defaultAppend": "=\"$1\"$0", 843 | "strings": [ 844 | "abbr", 845 | "align", 846 | "axis", 847 | "char", 848 | "charoff", 849 | "colspan", 850 | "headers", 851 | "height", 852 | "rowspan", 853 | "scope", 854 | "valign", 855 | "width" 856 | ] 857 | }, 858 | 859 | { 860 | "name": "html.tags.textarea.attributes", 861 | "defaultAppend": "=\"$1\"$0", 862 | "strings": [ 863 | "cols", 864 | "rows", 865 | "disabled", 866 | "name", 867 | "readonly", 868 | // HTML5 869 | "autofocus", 870 | "form", 871 | "maxlength", 872 | "placeholder", 873 | "required", 874 | "wrap" 875 | ] 876 | }, 877 | 878 | { 879 | "name": "html.tags.tfoot.attributes", 880 | "defaultAppend": "=\"$1\"$0", 881 | "strings": [ 882 | "char", 883 | "charoff", 884 | "valign" 885 | ] 886 | }, 887 | 888 | { 889 | "name": "html.tags.th.attributes", 890 | "defaultAppend": "=\"$1\"$0", 891 | "strings": [ 892 | "abbr", 893 | "axis", 894 | "char", 895 | "charoff", 896 | "colspan", 897 | "headers", 898 | "height", 899 | "rowspan", 900 | "scope", 901 | "valign", 902 | "width" 903 | ] 904 | }, 905 | 906 | { 907 | "name": "html.tags.thead.attributes", 908 | "defaultAppend": "=\"$1\"$0", 909 | "strings": [ 910 | "char", 911 | "charoff", 912 | "valign" 913 | ] 914 | }, 915 | 916 | // HTML5 917 | { 918 | "name": "html.tags.time.attributes", 919 | "defaultAppend": "=\"$1\"$0", 920 | "strings": [ 921 | "datetime", 922 | { 923 | "string": "pubdate", 924 | "append": "" 925 | } 926 | ] 927 | }, 928 | 929 | { 930 | "name": "html.tags.tr.attributes", 931 | "defaultAppend": "=\"$1\"$0", 932 | "strings": [ 933 | "char", 934 | "charoff", 935 | "valign" 936 | ] 937 | }, 938 | 939 | // HTML5 940 | { 941 | "name": "html.tags.track.attributes", 942 | "defaultAppend": "=\"$1\"$0", 943 | "strings": [ 944 | "kind", 945 | "label", 946 | "src", 947 | "srclang" 948 | ] 949 | }, 950 | 951 | // HTML5 952 | { 953 | "name": "html.tags.video.attributes", 954 | "defaultAppend": "=\"$1\"$0", 955 | "strings": [ 956 | "autoplay", 957 | "controls", 958 | "height", 959 | "loop", 960 | "poster", 961 | "preload", 962 | "src", 963 | "width" 964 | ] 965 | }, 966 | 967 | // Attribute values 968 | // Generic attribute completions 969 | { 970 | "name": "html.tags.alltags.attributes.href.attribute-values", 971 | "strings": [ 972 | "../", 973 | "../../", 974 | "http://", 975 | "https://" 976 | ] 977 | }, 978 | 979 | { 980 | "name": "html.tags.alltags.attributes.src.attribute-values", 981 | "strings": [ 982 | "../", 983 | "../../", 984 | "http://", 985 | "https://" 986 | ] 987 | }, 988 | 989 | // Tag-specific attribute completions 990 | { 991 | "name": "html.tags.input.attributes.type.attribute-values", 992 | "strings": [ 993 | "button", 994 | "checkbox", 995 | "file", 996 | "hidden", 997 | "image", 998 | "password", 999 | "radio", 1000 | "reset", 1001 | "submit", 1002 | "text", 1003 | // HTML 5 1004 | "color", 1005 | "date", 1006 | "datetime", 1007 | "datetime-local", 1008 | "email", 1009 | "month", 1010 | "number", 1011 | "range", 1012 | "search", 1013 | "tel", 1014 | "time", 1015 | "url", 1016 | "week" 1017 | ] 1018 | }, 1019 | { 1020 | "name": "html.tags.link.attributes.media.attribute-values", 1021 | "strings": [ 1022 | "all", 1023 | "aura", 1024 | "braille", 1025 | "handheld", 1026 | "print", 1027 | "projection", 1028 | "screen", 1029 | "tty", 1030 | "tv" 1031 | ] 1032 | }, 1033 | { 1034 | "name": "html.tags.a.attributes.rel.attribute-values", 1035 | "strings": [ 1036 | "alternate", 1037 | "appendix", 1038 | "archives", 1039 | "author", 1040 | "bookmark", 1041 | "chapter", 1042 | "contents", 1043 | "copyright", 1044 | "external", 1045 | "first", 1046 | "glossary", 1047 | "help", 1048 | "index", 1049 | "last", 1050 | "license", 1051 | "next", 1052 | "nofollow", 1053 | "noreferrer", 1054 | "prev", 1055 | "search", 1056 | "section", 1057 | "sidebar", 1058 | "start", 1059 | "subsection", 1060 | "tag", 1061 | "up" 1062 | ] 1063 | }, 1064 | { 1065 | "name": "html.tags.a.attributes.target.attribute-values", 1066 | "strings": [ 1067 | "_blank", 1068 | "_parent", 1069 | "_self", 1070 | "_top" 1071 | ] 1072 | }, 1073 | { 1074 | "name": "html.tags.area.attributes.rel.attribute-values", 1075 | "strings": [ 1076 | "alternate", 1077 | "appendix", 1078 | "archives", 1079 | "author", 1080 | "bookmark", 1081 | "chapter", 1082 | "contents", 1083 | "copyright", 1084 | "external", 1085 | "first", 1086 | "glossary", 1087 | "help", 1088 | "index", 1089 | "last", 1090 | "license", 1091 | "next", 1092 | "nofollow", 1093 | "noreferrer", 1094 | "prev", 1095 | "search", 1096 | "section", 1097 | "sidebar", 1098 | "start", 1099 | "subsection", 1100 | "tag", 1101 | "up" 1102 | ] 1103 | }, 1104 | { 1105 | "name": "html.tags.link.attributes.rel.attribute-values", 1106 | "strings": [ 1107 | "alternate", 1108 | "appendix", 1109 | "archives", 1110 | "author", 1111 | "bookmark", 1112 | "chapter", 1113 | "contents", 1114 | "copyright", 1115 | "first", 1116 | "glossary", 1117 | "help", 1118 | "icon", 1119 | "index", 1120 | "last", 1121 | "license", 1122 | "next", 1123 | "pingback", 1124 | "prefetch", 1125 | "prev", 1126 | "search", 1127 | "section", 1128 | "start", 1129 | "stylesheet", 1130 | "sidebar", 1131 | "subsection", 1132 | "tag", 1133 | "up" 1134 | ] 1135 | }, 1136 | // HTML 5 audio/video 1137 | { 1138 | "name": "html.tags.audio.attributes.preload.attribute-values", 1139 | "strings": [ 1140 | "auto", 1141 | "metadata", 1142 | "none" 1143 | ] 1144 | }, 1145 | { 1146 | "name": "html.tags.video.attributes.preload.attribute-values", 1147 | "strings": [ 1148 | "auto", 1149 | "metadata", 1150 | "none" 1151 | ] 1152 | } 1153 | ], 1154 | 1155 | "contexts": [ 1156 | { 1157 | "description": "HTML Tag Completion", 1158 | "scope": "text.html - source - comment - string", 1159 | "pattern": "<([a-zA-Z0-9]*)", 1160 | "completionCaptureIndex": 1, 1161 | "completionSetNames": [ 1162 | "html.tags.with-newline", 1163 | "html.tags", 1164 | "html.tags.self-closing", 1165 | "html.tags.html5" 1166 | ] 1167 | }, 1168 | { 1169 | "description": "HTML Attribute Completion", 1170 | "scope": "text.html meta.tag", 1171 | "pattern": "<([a-zA-Z0-9]*)(?:\\s+[a-zA-Z0-9-:_]+\\s*=\\s*(?:'.*'|\".*\"))*(?:(?:\\s([a-zA-Z0-9-]+))|\\s)", 1172 | "completionCaptureIndex": 2, 1173 | "completionSetNames": [ 1174 | "html.tags.$1.attributes", 1175 | "html.tags.standard-attributes", 1176 | "html.tags.event-attributes" 1177 | ] 1178 | }, 1179 | { 1180 | "description": "HTML Attribute Values Completion", 1181 | "scope": "text.html meta.tag string.quoted", 1182 | "pattern": "<([a-zA-Z0-9]*)(?:\\s+[a-zA-Z0-9-:_]+\\s*=\\s*(?:'.*'|\".*\"))*(?:\\s([a-zA-Z0-9-]+)\\s*=\\s*(?:[\"'])([a-zA-Z0-9-]*))", 1183 | "completionCaptureIndex": 3, 1184 | "completionSetNames": [ 1185 | "html.tags.alltags.attributes.$2.attribute-values", 1186 | "html.tags.$1.attributes.$2.attribute-values" 1187 | ] 1188 | } 1189 | ] 1190 | } 1191 | -------------------------------------------------------------------------------- /CodeCompletion/js.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Textastic Code Completion for JavaScript", 3 | "uuid": "DE267669-E66E-400A-ACEA-BD906DC2B812", 4 | 5 | "completionSets": [ 6 | { 7 | "name": "js.keywords.control", 8 | "defaultAppend": "", 9 | 10 | "strings": [ 11 | { "string": "continue", "append": ";" }, 12 | 13 | { "string": "for", "append": " (${1:${2:var i = 0}; ${3:i < count}; ${4:i++}}) {\n\t$0\n}" }, 14 | { "string": "forin", "replace": "for (${1:variable} in ${2:object}) {\n\t$0\n}" }, 15 | 16 | { "string": "if", "append": " ($1) {\n\t$0\n}" }, 17 | { "string": "else", "append": " {\n\t$0\n}" }, 18 | 19 | { "string": "switch", "append": " ($1) {\n\t$0\n}" }, 20 | { "string": "case", "append": " ${1:condition}: " }, 21 | { "string": "break", "append": ";" }, 22 | { "string": "default", "append": ":" }, 23 | 24 | { "string": "try", "append": " {\n\t$0\n}" }, 25 | { "string": "catch", "append": " (${1:error}) {\n\t$0\n}" }, 26 | { "string": "finally", "append": " {\n\t$0\n}" }, 27 | "throw", 28 | 29 | { "string": "do", "append": " {\n\t$0\n} while ($1);" }, 30 | { "string": "while", "append": " (${1:?}){\n\t$2\n}" }, 31 | 32 | { "string": "with", "append": " ($1) {\n\t$0\n}" }, 33 | 34 | "in", 35 | "return", 36 | "void" 37 | ] 38 | }, 39 | { 40 | "name": "js.keywords.control.else-if", 41 | 42 | "strings": [ 43 | { "string": "else if", "append": " ($1) {\n\t$0\n}" } 44 | ] 45 | }, 46 | { 47 | "name": "js.keywords", 48 | "defaultAppend": "", 49 | "strings": [ 50 | { "string": "function", "append": " ${1:name}($2) {\n\t$0\n}" }, 51 | 52 | "new", 53 | "delete", 54 | 55 | "super", 56 | "this", 57 | "var", 58 | 59 | "instanceof", 60 | "typeof", 61 | 62 | "Infinity", 63 | "undefined", 64 | "NaN", 65 | "true", 66 | "false", 67 | "null" 68 | ] 69 | }, 70 | { 71 | "name": "js.native-objects", 72 | "defaultAppend": "($1)", 73 | "strings": [ 74 | "Array", 75 | "Boolean", 76 | "Date", 77 | "Error", 78 | "Function", 79 | "Number", 80 | "Object", 81 | "RegExp", 82 | "String", 83 | "Image", 84 | "Node" 85 | ] 86 | }, 87 | { 88 | "name": "js.native-objects.static", 89 | "strings": [ 90 | "Date", 91 | "Math", 92 | "Number", 93 | "String", 94 | "Node" 95 | ] 96 | }, 97 | { 98 | "name": "js.native-objects.Date", 99 | "strings": [ 100 | { "string": "UTC", "append": "(${1:yyyy}, ${2:mm}, ${3:dd}${4:, ${5:hh}, ${6:mm}, ${7:ss}, ${8:ms}})" } 101 | ] 102 | }, 103 | { 104 | "name": "js.native-objects.Math", 105 | "strings": [ 106 | "E", 107 | "LN2", 108 | "LN10", 109 | "LOG2E", 110 | "LOG10E", 111 | "PI", 112 | "SQRT1_2", 113 | "SQRT2", 114 | { "string": "abs", "append": "(${1:number})" }, 115 | { "string": "acos", "append": "(${1:number})" }, 116 | { "string": "asin", "append": "(${1:number})" }, 117 | { "string": "atan", "append": "(${1:number})" }, 118 | { "string": "atan2", "append": "(${1:x}, ${2:y})" }, 119 | { "string": "ceil", "append": "(${1:number})" }, 120 | { "string": "cos", "append": "(${1:number})" }, 121 | { "string": "exp", "append": "(${1:number})" }, 122 | { "string": "floor", "append": "(${1:number})" }, 123 | { "string": "log", "append": "(${1:number})" }, 124 | { "string": "max", "append": "(${1:number1}, ${2:number2})" }, 125 | { "string": "min", "append": "(${1:number1}, ${2:number2})" }, 126 | { "string": "pow", "append": "(${1:number1}, ${2:number2})" }, 127 | { "string": "random", "append": "()" }, 128 | { "string": "round", "append": "(${1:number})" }, 129 | { "string": "sin", "append": "(${1:number})" }, 130 | { "string": "sqrt", "append": "(${1:number})" }, 131 | { "string": "tan", "append": "(${1:number})" } 132 | ] 133 | }, 134 | { 135 | "name": "js.native-objects.Number", 136 | "strings": [ 137 | "MAX_VALUE", 138 | "MIN_VALUE", 139 | "NEGATIVE_INFINITY", 140 | "POSITIVE_INFINITY" 141 | ] 142 | }, 143 | { 144 | "name": "js.native-objects.String", 145 | "strings": [ 146 | { "string": "fromCharCode", "append": "(${1:num1}${2:, ${3:num2 ...}})" } 147 | ] 148 | }, 149 | { 150 | "name": "js.native-objects.Node", 151 | "strings": [ 152 | "ATTRIBUTE_NODE", 153 | "CDATA_SECTION_NODE", 154 | "COMMENT_NODE", 155 | "DOCUMENT_FRAGMENT_NODE", 156 | "DOCUMENT_NODE", 157 | "DOCUMENT_TYPE_NODE", 158 | "ELEMENT_NODE", 159 | "ENTITY_NODE", 160 | "ENTITY_REFERENCE_NODE", 161 | "NOTATION_NODE", 162 | "PROCESSING_INSTRUCTION_NODE", 163 | "TEXT_NODE" 164 | ] 165 | }, 166 | 167 | 168 | { 169 | "name": "js.functions", 170 | "defaultAppend": "(${1:string})", 171 | "strings": [ 172 | { "string": "decodeURI", "append": "(${1:encodedURI})" }, 173 | { "string": "decodeURIComponent", "append": "(${1:encodedURIComponent})" }, 174 | "encodeURI", 175 | "encodeURIComponent", 176 | "escape", 177 | "eval", 178 | { "string": "isFinite", "append": "(${1:expression})" }, 179 | { "string": "isNaN", "append": "(${1:expression})" }, 180 | { "string": "parseInt", "append": "(${1:string}${2:, ${3:base}})" }, 181 | "parseFloat", 182 | "unescape" 183 | ] 184 | }, 185 | { 186 | "name": "js.properties", 187 | "strings": [ 188 | // common 189 | "constructor", 190 | "length", 191 | // Error 192 | "message", 193 | "name", 194 | // Function 195 | "caller", 196 | // RegExp 197 | "global", 198 | "ignoreCase", 199 | "lastIndex", 200 | "multiline", 201 | "source" 202 | ] 203 | }, 204 | { 205 | "name": "js.methods", 206 | "defaultAppend": "()", 207 | "strings": [ 208 | // common 209 | "toLocaleString", 210 | "toString", 211 | "valueOf", 212 | 213 | // Array 214 | { "string": "concat", "append": "(${1:array1}${2:, ${3:array2, ...}})" }, 215 | { "string": "join", "append": "(${1:delimiter})" }, 216 | "pop", 217 | { "string": "push", "append": "(${1:item1}${2:, ${3:item2, ...}})" }, 218 | "reverse", 219 | "shift", 220 | { "string": "slice", "append": "(${1:startIndex}${2:, ${3:endIndex}})" }, 221 | { "string": "sort", "append": "(${1:function(a, b) {$2\\}})" }, 222 | { "string": "splice", "append": "(${1:startIndex}, ${2:deleteCount}${3:, ${4:replacingItem1, ...}})" }, 223 | { "string": "unshift", "append": "(${1:item1}${2:, ${3:item2, ...}})" }, 224 | 225 | // Date 226 | "getDate", 227 | "getDay", 228 | "getFullYear", 229 | "getHours", 230 | "getMilliseconds", 231 | "getMinutes", 232 | "getMonth", 233 | "getSeconds", 234 | "getTime", 235 | "getTimezoneOffset", 236 | "getUTCDate", 237 | "getUTCDay", 238 | "getUTCFullYear", 239 | "getUTCHours", 240 | "getUTCMilliseconds", 241 | "getUTCMinutes", 242 | "getUTCMonth", 243 | "getUTCSeconds", 244 | "getYear", 245 | { "string": "parse", "append": "(${1:dateString})" }, 246 | { "string": "setDate", "append": "(${1:dateInteger})" }, 247 | { "string": "setFullYear", "append": "(${1:yearInteger})" }, 248 | { "string": "setHours", "append": "(${1:hoursInteger})" }, 249 | { "string": "setMilliseconds", "append": "(${1:msInteger})" }, 250 | { "string": "setMinutes", "append": "(${1:minutesInteger})" }, 251 | { "string": "setMonth", "append": "(${1:monthInteger})" }, 252 | { "string": "setSeconds", "append": "(${1:secondsInteger})" }, 253 | { "string": "setTime", "append": "(${1:msInteger})" }, 254 | { "string": "setUTCDate", "append": "(${1:dateInteger})" }, 255 | { "string": "setUTCFullYear", "append": "(${1:yearInteger})" }, 256 | { "string": "setUTCHours", "append": "(${1:hoursInteger})" }, 257 | { "string": "setUTCMilliseconds", "append": "(${1:msInteger})" }, 258 | { "string": "setUTCMinutes", "append": "(${1:minutesInteger})" }, 259 | { "string": "setUTCMonth", "append": "(${1:monthInteger})" }, 260 | { "string": "setUTCSeconds", "append": "(${1:secondsInteger})" }, 261 | { "string": "setYear", "append": "(${1:yearInteger})" }, 262 | "toDateString", 263 | "toGMTString", 264 | "toLocaleDateString", 265 | "toLocaleTimeString", 266 | "toTimeString", 267 | "toUTCString", 268 | 269 | // Function 270 | { "string": "apply", "append": "(${1:${2:thisOjbect}, ${3:argumentsArray}})" }, 271 | { "string": "call", "append": "(${1:${2:thisObject}${3:, ${4:arg1, ...}}})" }, 272 | 273 | // Number 274 | { "string": "toExponential", "append": "(${1:fractionDigits})" }, 275 | { "string": "toFixed", "append": "(${1:fractionDigits})" }, 276 | { "string": "toPrecision", "append": "(${1:precisionDigits})" }, 277 | 278 | // Object 279 | { "string": "hasOwnProperty", "append": "(${1:propertyName})" }, 280 | { "string": "isPrototypeOf", "append": "(${1:objectReference})" }, 281 | 282 | // RegExp 283 | { "string": "exec", "append": "(${1:string})" }, 284 | { "string": "test", "append": "(${1:string})" }, 285 | 286 | // String 287 | { "string": "charAt", "append": "(${1:positionIndex})" }, 288 | { "string": "charCodeAt", "append": "(${1:positionIndex})" }, 289 | { "string": "concat", "append": "(${1:string2})" }, 290 | { "string": "indexOf", "append": "(${1:search}${2:, ${3:fromIndex}})" }, 291 | { "string": "lastIndexOf", "append": "(${1:search}${2:, ${3:fromIndex}})" }, 292 | { "string": "localeCompare", "append": "(${1:string2})" }, 293 | { "string": "match", "append": "(${1:regex})" }, 294 | { "string": "replace", "append": "(${1:regex}, ${2:replacement})" }, 295 | { "string": "search", "append": "(${1:regex})" }, 296 | { "string": "slice", "append": "(${1:startPositionIndex}, ${2:endPositionIndex})" }, 297 | { "string": "split", "append": "(${1:delimiter}${2:, ${3:limitInteger}})" }, 298 | { "string": "substr", "append": "(${1:startPositionIndex}${2:, ${3:length}})" }, 299 | { "string": "substring", "append": "(${1:startPositionIndex}, ${2:endPositionIndex})" }, 300 | "toLocaleLowerCase", 301 | "toLocaleUpperCase", 302 | "toLowerCase", 303 | "toUpperCase" 304 | ] 305 | }, 306 | 307 | // DOM support 308 | 309 | // DOM variables 310 | { 311 | "name": "js.dom.variables", 312 | 313 | "strings": [ 314 | "document", 315 | "history", 316 | "localStorage", 317 | "location", 318 | "screen", 319 | "window", 320 | "self", 321 | "top", 322 | "parent" 323 | ] 324 | }, 325 | 326 | // DOM properties 327 | { 328 | "name": "js.dom.properties", 329 | 330 | "strings": [ 331 | "accessKey", 332 | "attributes", 333 | "childNodes", 334 | "className", 335 | "clientHeight", 336 | "clientWidth", 337 | "contentEditable", 338 | "dir", 339 | "disabled", 340 | "firstChild", 341 | "lastChild", 342 | "id", 343 | "innerHTML", 344 | "innerText", 345 | "lang", 346 | "nextSibling", 347 | "previousSibling", 348 | "nodeName", 349 | "nodeType", 350 | "nodeValue", 351 | "offsetHeight", 352 | "offsetWidth", 353 | "offsetLeft", 354 | "offsetTop", 355 | "offsetParent", 356 | "ownerDocument", 357 | "parentNode", 358 | "scrollHeight", 359 | "scrollWidth", 360 | "scrollLeft", 361 | "scrollTop", 362 | "style", 363 | "tabIndex", 364 | "tagName", 365 | "textContent", 366 | "title" 367 | ] 368 | }, 369 | 370 | // DOM methods 371 | { 372 | "name": "js.dom.methods", 373 | "defaultAppend": "()", 374 | 375 | "strings": [ 376 | { "string": "addEventListener", "append": "(${1:eventType}, ${2:listener}, ${4:useCapture})" }, 377 | { "string": "appendChild", "append": "(${1:nodeObject})" }, 378 | "blur", 379 | "click", 380 | { "string": "cloneNode", "append": "(${1:deepCopyBoolean})" }, 381 | { "string": "dispatchEvent", "append": "(${1:eventObjectReference})" }, 382 | "focus", 383 | { "string": "getAttribute", "append": "(${1:attributeName})" }, 384 | { "string": "getAttributeNode", "append": "(${1:attributeName})" }, 385 | { "string": "getAttributeNodeNS", "append": "(${1:namespaceURI}, ${2:localName})" }, 386 | { "string": "getAttributeNS", "append": "(${1:namespaceURI}, ${2:localName})" }, 387 | { "string": "getElementsByTagName", "append": "(${1:tagName})" }, 388 | { "string": "getElementsByTagNameNS", "append": "(${1:namespaceURI}, ${2:localName})" }, 389 | { "string": "hasAttribute", "append": "(${1:attributeName})" }, 390 | { "string": "hasAttributeNS", "append": "(${1:namespaceURI}, ${2:localName})" }, 391 | "hasChildNodes", 392 | { "string": "insertBefore", "append": "(${1:newChildNode}, ${2:referenceChildNodeOrNull})" }, 393 | { "string": "isSupported", "append": "(${1:feature}, ${2:version})" }, 394 | { "string": "lookupNamespaceURI", "append": "(${1:prefix})" }, 395 | { "string": "lookupPrefix", "append": "(${1:namespaceURI})" }, 396 | "normalize", 397 | { "string": "removeAttribute", "append": "(${1:attributeName})" }, 398 | { "string": "removeAttributeNode", "append": "(${1:attributeNodeReference})" }, 399 | { "string": "removeAttributeNS", "append": "(${1:namespaceURI}, ${2:localName})" }, 400 | { "string": "removeChild", "append": "(${1:childNodeReference})" }, 401 | { "string": "removeEventListener", "append": "(${1:eventType}, ${2:listener}, ${4:useCapture})" }, 402 | { "string": "replaceChild", "append": "(${1:newChildNodeReference}, ${2:oldChildNodeReference})" }, 403 | { "string": "setAttribute", "append": "(${1:attributeName}, ${2:value})" }, 404 | { "string": "setAttributeNode", "append": "(${1:attributeObjectReference})" }, 405 | { "string": "setAttributeNodeNS", "append": "(${1:attributeObjectReference})" }, 406 | { "string": "setAttributeNS", "append": "(${1:namespaceURI}, ${2:qualifiedName}, ${3:value})" }, 407 | "toString" 408 | ] 409 | }, 410 | 411 | // Event Strings 412 | { 413 | "name": "js.dom.events", 414 | 415 | "strings": [ 416 | "abort", 417 | "blur", 418 | "change", 419 | "click", 420 | "error", 421 | "focus", 422 | "load", 423 | "mousedown", 424 | "mousemove", 425 | "mouseout", 426 | "mouseover", 427 | "mouseup", 428 | "reset", 429 | "resize", 430 | "scroll", 431 | "select", 432 | "submit", 433 | "storage", 434 | "unload" 435 | ] 436 | }, 437 | 438 | // Document 439 | { 440 | "name": "js.dom.document.properties", 441 | 442 | "strings": [ 443 | "anchors", 444 | "applets", 445 | "body", 446 | "cookie", 447 | "defaultView", 448 | "designMode", 449 | "documentElement", 450 | "documentURI", 451 | "doctype", 452 | "domain", 453 | "embeds", 454 | "forms", 455 | "frames", 456 | "images", 457 | "implementation", 458 | "lastModified", 459 | "links", 460 | "referrer", 461 | "styleSheets", 462 | "title", 463 | "URL" 464 | ] 465 | }, 466 | 467 | { 468 | "name": "js.dom.document.methods", 469 | 470 | "defaultAppend": "()", 471 | 472 | "strings": [ 473 | "clear", 474 | "close", 475 | { "string": "createAttribute", "append": "(${1:attributeName})" }, 476 | { "string": "createAttributeNS", "append": "(${1:namespaceURI}, ${2:qualifiedName})" }, 477 | { "string": "createCDATASection", "append": "(${1:data})" }, 478 | { "string": "createComment", "append": "(${1:commentText})" }, 479 | "createDocumentFragment", 480 | { "string": "createElement", "append": "(${1:tagName})" }, 481 | { "string": "createElementNS", "append": "(${1:namespaceURI}, ${2:qualifiedName})" }, 482 | { "string": "createEntityReference", "append": "(${1:entityName})" }, 483 | { "string": "createEvent", "append": "(${1:eventType})" }, 484 | { "string": "createProcessingInstruction", "append": "(${1:target}, ${2:data})" }, 485 | "createRange", 486 | { "string": "createTextNode", "append": "(${1:text})" }, 487 | { "string": "createTreeWalker", "append": "(${1:rootNode}, ${2:whatToShow}, ${3:filterFunction}, ${4:entityRefExpansion})" }, 488 | { "string": "elementFromPoint", "append": "(${1:x}, ${2:y})" }, 489 | { "string": "execCommand", "append": "(${1:commandName}${2:, ${3:displayUI}, ${4:value}})" }, 490 | { "string": "getElementById", "append": "(${1:id})" }, 491 | { "string": "getElementsByName", "append": "(${1:elementName})" }, 492 | { "string": "importNode", "append": "(${1:nodeReference}, ${2:deepBoolean})" }, 493 | { "string": "open", "append": "(${1:${2:MIMEType}, ${3:replace}})" }, 494 | { "string": "write", "append": "(${1:string1}${2:, ${3:string2, ...}})" }, 495 | { "string": "writeln", "append": "(${1:string1}${2:, ${3:string2, ...}})" } 496 | ] 497 | }, 498 | 499 | // History 500 | { 501 | "name": "js.dom.history.properties", 502 | 503 | "strings": [ 504 | "length" 505 | ] 506 | }, 507 | 508 | { 509 | "name": "js.dom.history.methods", 510 | "defaultAppend": "()", 511 | 512 | "strings": [ 513 | "back", 514 | "forward", 515 | { "string": "go", "append": "(${1:stepCountOrURL})" } 516 | ] 517 | }, 518 | 519 | // Location 520 | { 521 | "name": "js.dom.location.properties", 522 | 523 | "strings": [ 524 | "hash", 525 | "host", 526 | "hostname", 527 | "href", 528 | "pathname", 529 | "port", 530 | "protocol", 531 | "search" 532 | ] 533 | }, 534 | { 535 | "name": "js.dom.location.methods", 536 | 537 | "strings": [ 538 | { "string": "reload", "append": "(${1:byPassCache})" }, 539 | { "string": "replace", "append": "(${1:URL})" } 540 | ] 541 | }, 542 | 543 | // Screen 544 | { 545 | "name": "js.dom.screen.properties", 546 | 547 | "strings": [ 548 | "availHeight", 549 | "availWidth", 550 | "availLeft", 551 | "availTop", 552 | "colorDepth", 553 | "height", 554 | "width", 555 | "pixelDepth" 556 | ] 557 | }, 558 | 559 | // Window 560 | { 561 | "name": "js.dom.window.properties", 562 | 563 | "strings": [ 564 | "closed", 565 | "defaultStatus", 566 | "document", 567 | "frameElement", 568 | "frames", 569 | "history", 570 | "innerHeight", 571 | "innerWidth", 572 | "length", 573 | "location", 574 | "localStorage", 575 | "name", 576 | "navigator", 577 | "opener", 578 | "outerHeight", 579 | "outerWidth", 580 | "pageXOffset", 581 | "pageYOffset", 582 | "parent", 583 | "screen", 584 | "screenLeft", 585 | "screenTop", 586 | "screenX", 587 | "screenY", 588 | "scrollX", 589 | "scrollY", 590 | "status" 591 | ] 592 | }, 593 | 594 | { 595 | "name": "js.dom.window.methods.global", 596 | 597 | "strings": [ 598 | { "string": "alert", "append": "(${1:message})" }, 599 | { "string": "clearInterval", "append": "(${1:intervalID})" }, 600 | { "string": "clearTimeout", "append": "(${1:timeoutID})" }, 601 | { "string": "confirm", "append": "(${1:message})" }, 602 | { "string": "prompt", "append": "(${1:message}, ${2:defaultReply})" }, 603 | { "string": "setInterval", "append": "(${1:functionReference}, ${2:milliseconds})" }, 604 | { "string": "setTimeout", "append": "(${1:functionReference}, ${2:milliseconds})" } 605 | ] 606 | }, 607 | 608 | { 609 | "name": "js.dom.window.methods", 610 | "defaultAppend": "()", 611 | 612 | "strings": [ 613 | "close", 614 | "getSelection", 615 | { "string": "moveBy", "append": "(${1:deltaX}, ${2:deltaY})" }, 616 | { "string": "moveTo", "append": "(${1:x}, ${2:y})" }, 617 | { "string": "open", "append": "(${1:URL}, ${2:windowName}${3:, ${4:windowFeatures}})" }, 618 | "print", 619 | { "string": "resizeBy", "append": "(${1:deltaX}, ${2:deltaY})" }, 620 | { "string": "resizeTo", "append": "(${1:x}, ${2:y})" }, 621 | { "string": "scroll", "append": "(${1:x}, ${2:y})" }, 622 | { "string": "scrollBy", "append": "(${1:deltaX}, ${2:deltaY})" }, 623 | { "string": "scrollTo", "append": "(${1:x}, ${2:y})" } 624 | ] 625 | }, 626 | 627 | { 628 | "name": "js.dom.localStorage.methods", 629 | 630 | "strings": [ 631 | { "string": "key", "append": "(${1:index})" }, 632 | { "string": "getItem", "append": "(${1:key})" }, 633 | { "string": "setItem", "append": "(${1:key}, ${2:value})" }, 634 | { "string": "removeItem", "append": "(${1:key})" }, 635 | { "string": "clear", "append": "()" } 636 | ] 637 | } 638 | ], 639 | 640 | "contexts": [ 641 | { 642 | "description": "Control keywords", 643 | "scope": "source.js - comment - string", 644 | "pattern": "(?<!\\.|\\[|\\(|,)\\b([a-zA-Z]+)", 645 | "completionCaptureIndex": 1, 646 | "completionSetNames": [ 647 | "js.keywords.control" 648 | ] 649 | }, 650 | { 651 | "description": "else if keyword", 652 | "scope": "source.js - comment - string", 653 | "pattern": "(?<!\\.|\\[|\\(|,)\\b(e[lse if]*)", 654 | "completionCaptureIndex": 1, 655 | "completionSetNames": [ 656 | "js.keywords.control.else-if" 657 | ] 658 | }, 659 | { 660 | "description": "Non-control keywords", 661 | "scope": "source.js - comment - string", 662 | "pattern": "(?<!\\.)\\b([a-zA-Z]+)", 663 | "completionCaptureIndex": 1, 664 | "completionSetNames": [ 665 | "js.keywords" 666 | ] 667 | }, 668 | { 669 | "description": "Variables and functions", 670 | "scope": "source.js - comment - string", 671 | "pattern": "(?<!\\.)\\b([a-zA-Z]+)", 672 | "completionCaptureIndex": 1, 673 | "completionSetNames": [ 674 | "js.functions", 675 | "js.dom.variables", 676 | "js.dom.window.methods.global" 677 | ] 678 | }, 679 | { 680 | "description": "Properties and methods", 681 | "scope": "source.js - comment - string", 682 | "pattern": "\\.([a-zA-Z][a-zA-Z ]*)", 683 | "completionCaptureIndex": 1, 684 | "completionSetNames": [ 685 | "js.properties", 686 | "js.methods", 687 | "js.dom.properties", 688 | "js.dom.methods" 689 | ] 690 | }, 691 | { 692 | "description": "Native objects", 693 | "scope": "source.js - comment - string", 694 | "pattern": "\\bnew\\s+([a-zA-Z]*)", 695 | "completionCaptureIndex": 1, 696 | "completionSetNames": [ 697 | "js.native-objects" 698 | ] 699 | }, 700 | { 701 | "description": "Native objects, without \"new\"", 702 | "scope": "source.js - comment - string", 703 | "pattern": "(?<!new )\\b([A-Z][a-zA-Z]*)", 704 | "completionCaptureIndex": 1, 705 | "completionSetNames": [ 706 | "js.native-objects.static" 707 | ] 708 | }, 709 | { 710 | "description": "Native objects, Date", 711 | "scope": "source.js - comment - string", 712 | "pattern": "\\bDate\\.(\\w*)", 713 | "completionCaptureIndex": 1, 714 | "completionSetNames": [ 715 | "js.native-objects.Date" 716 | ] 717 | }, 718 | { 719 | "description": "Native objects, Math", 720 | "scope": "source.js - comment - string", 721 | "pattern": "\\bMath\\.(\\w*)", 722 | "completionCaptureIndex": 1, 723 | "completionSetNames": [ 724 | "js.native-objects.Math" 725 | ] 726 | }, 727 | { 728 | "description": "Native objects, Number", 729 | "scope": "source.js - comment - string", 730 | "pattern": "\\bNumber\\.(\\w*)", 731 | "completionCaptureIndex": 1, 732 | "completionSetNames": [ 733 | "js.native-objects.Number" 734 | ] 735 | }, 736 | { 737 | "description": "Native objects, String", 738 | "scope": "source.js - comment - string", 739 | "pattern": "\\bString\\.(\\w*)", 740 | "completionCaptureIndex": 1, 741 | "completionSetNames": [ 742 | "js.native-objects.String" 743 | ] 744 | }, 745 | { 746 | "description": "Native objects, Node", 747 | "scope": "source.js - comment - string", 748 | "pattern": "\\bNode\\.(\\w*)", 749 | "completionCaptureIndex": 1, 750 | "completionSetNames": [ 751 | "js.native-objects.Node" 752 | ] 753 | }, 754 | 755 | { 756 | "description": "DOM events", 757 | "scope": "source.js string", 758 | "pattern": "\\b(?:addEventListener|removeEventListener)\\s*\\(\\s*['\"]([a-zA-Z]*)", 759 | "completionCaptureIndex": 1, 760 | "completionSetNames": [ 761 | "js.dom.events" 762 | ] 763 | }, 764 | 765 | // DOM properties and methods 766 | { 767 | "description": "document", 768 | "scope": "source.js - comment - string", 769 | "pattern": "\\bdocument\\.(\\w*)", 770 | "completionCaptureIndex": 1, 771 | "completionSetNames": [ 772 | "js.dom.document.properties", 773 | "js.dom.document.methods" 774 | ] 775 | }, 776 | { 777 | "description": "history", 778 | "scope": "source.js - comment - string", 779 | "pattern": "\\bhistory\\.(\\w*)", 780 | "completionCaptureIndex": 1, 781 | "completionSetNames": [ 782 | "js.dom.history.properties", 783 | "js.dom.history.methods" 784 | ] 785 | }, 786 | { 787 | "description": "location", 788 | "scope": "source.js - comment - string", 789 | "pattern": "\\blocation\\.(\\w*)", 790 | "completionCaptureIndex": 1, 791 | "completionSetNames": [ 792 | "js.dom.location.properties", 793 | "js.dom.location.methods" 794 | ] 795 | }, 796 | { 797 | "description": "screen", 798 | "scope": "source.js - comment - string", 799 | "pattern": "\\bscreen\\.(\\w*)", 800 | "completionCaptureIndex": 1, 801 | "completionSetNames": [ 802 | "js.dom.screen.properties" 803 | ] 804 | }, 805 | { 806 | "description": "localStorage", 807 | "scope": "source.js - comment - string", 808 | "pattern": "\\blocalStorage\\.(\\w*)", 809 | "completionCaptureIndex": 1, 810 | "completionSetNames": [ 811 | "js.dom.localStorage.methods" 812 | ] 813 | }, 814 | { 815 | "description": "window", 816 | "scope": "source.js - comment - string", 817 | "pattern": "\\b(window|opener|parent|self|top)\\.(\\w*)", 818 | "completionCaptureIndex": 2, 819 | "completionSetNames": [ 820 | "js.dom.window.properties", 821 | "js.dom.window.methods", 822 | "js.dom.window.methods.global" 823 | ] 824 | } 825 | 826 | ] 827 | } --------------------------------------------------------------------------------