├── .gitignore ├── screenshots ├── code-sample.png ├── grammar-snippets.png └── javascript-meteor-select.png ├── package.json ├── snippets ├── meteor-api-snippets-less.cson ├── meteor-api-snippets-spacebars.cson ├── meteor-api-snippets-html.cson ├── meteor-api-snippets-coffeescript.cson └── meteor-api-snippets-javascript.cson ├── styles └── meteor-color-coding.less ├── LICENSE.md ├── README.md ├── settings └── language-html.cson └── grammars ├── meteor-api-grammar-html.cson ├── meteor-api-grammar-spacebars.cson ├── meteor-api-grammar-coffeescript.cson └── meteor-api-grammar-javascript.cson /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | npm-debug.log 3 | node_modules 4 | -------------------------------------------------------------------------------- /screenshots/code-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awatson1978/meteor-api/HEAD/screenshots/code-sample.png -------------------------------------------------------------------------------- /screenshots/grammar-snippets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awatson1978/meteor-api/HEAD/screenshots/grammar-snippets.png -------------------------------------------------------------------------------- /screenshots/javascript-meteor-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awatson1978/meteor-api/HEAD/screenshots/javascript-meteor-select.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "meteor-api", 3 | "main": "./lib/meteor-api", 4 | "version": "2.20.0", 5 | "description": "Meteor API for the Atom editor.", 6 | "repository": "https://github.com/awatson1978/meteor-api", 7 | "license": "MIT", 8 | "engines": { 9 | "atom": ">0.50.0", 10 | "node": "*" 11 | }, 12 | "dependencies": {} 13 | } 14 | -------------------------------------------------------------------------------- /snippets/meteor-api-snippets-less.cson: -------------------------------------------------------------------------------- 1 | # Your snippets 2 | # 3 | # Atom snippets allow you to enter a simple prefix in the editor and hit tab to 4 | # expand the prefix into a larger code block with templated values. 5 | # 6 | # You can create a new snippet in this file by typing "snip" and then hitting 7 | # tab. 8 | # 9 | # An example CoffeeScript snippet to expand log to console.log: 10 | # 11 | # '.source.coffee': 12 | # 'Console log': 13 | # 'prefix': 'log' 14 | # 'body': 'console.log $1' 15 | # 16 | 17 | 18 | #=================================================== 19 | # Stylesheet / View Snippets 20 | 21 | 22 | 23 | 24 | 25 | '.less': 26 | 'Responsive Stylesheets': 27 | "prefix": "mobile" 28 | "body": 'media' 29 | -------------------------------------------------------------------------------- /styles/meteor-color-coding.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Your Stylesheet 3 | * 4 | * This stylesheet is loaded when Atom starts up and is reloaded automatically 5 | * when it is changed. 6 | * 7 | * If you are unfamiliar with LESS, you can read more about it here: 8 | * http://www.lesscss.org 9 | */ 10 | 11 | .tree-view { 12 | 13 | } 14 | 15 | atom-text-editor.editor { 16 | .api.meteor{ 17 | color: #ffffff; 18 | } 19 | .api.meteor.core{ 20 | color: #E8C6B8; 21 | } 22 | .api.meteor.ddp{ 23 | color: #FFA581; 24 | } 25 | .api.meteor.http{ 26 | color: #FF514F; 27 | } 28 | .api.meteor.template{ 29 | color: #FFB120; 30 | } 31 | .api.meteor.blaze{ 32 | color: #F51B15; 33 | } 34 | .api.meteor.router{ 35 | color: #52F3F5; 36 | } 37 | .api.meteor.collection{ 38 | color: #E8D361; 39 | } 40 | .api.meteor.session{ 41 | color: #35A0E8; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /snippets/meteor-api-snippets-spacebars.cson: -------------------------------------------------------------------------------- 1 | ".text.html.spacebars": 2 | "if": 3 | "prefix": "if" 4 | "body": "{{#if ${1:condition}}}\n\t$0\n{{/if}}" 5 | "if - else": 6 | "prefix": "ife" 7 | "body": "{{#if ${1:condition}}}\n\t$0\n{{else}}\n\t$1\n{{/if}}" 8 | "unless": 9 | "prefix": "un" 10 | "body": "{{#unless ${1:condition}}}\n\t$0\n{{/unless}}" 11 | "unless - else": 12 | "prefix": "une" 13 | "body": "{{#unless ${1:condition}}}\n\t$0\n{{else}}\n\t$1\n{{/unless}}" 14 | "with": 15 | "prefix": "wt" 16 | "body": "{{#with ${1:item}}}\n\t$0\n{{/with}}" 17 | "with - else": 18 | "prefix": "wte" 19 | "body": "{{#with ${1:item}}}\n\t$0\n{{else}}\n\t$1\n{{/with}}" 20 | "each": 21 | "prefix": "ea" 22 | "body": "{{#each ${1:items}}}\n\t$0\n{{/each}}" 23 | "partial": 24 | "prefix": "pa" 25 | "body": "{{> ${1:template} }}" 26 | 27 | 28 | '.html': 29 | 'Blaze Template': 30 | 'prefix': 'template' 31 | 'body': '' 32 | 'Blaze #each': 33 | 'prefix': '#each' 34 | 'body': ' 35 | {{#each ${1:collections}}}\n\t${2}\n{{/each}} 36 | ' 37 | 'Blaze #if': 38 | 'prefix': '#if' 39 | 'body': ' 40 | {{#if ${1:statement}}}\n\t${2}\n{{/if}} 41 | ' 42 | 'Blaze #if else': 43 | 'prefix': '#ife' 44 | 'body': '{{#if ${1:statement}}}\n\t${2}\n{{else}}\n\t${3}\n{{/if}} 45 | ' 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Meteor API for the Atom Editor 2 | ======================================= 3 | 4 | Bring Isomorphic Meteor javascript to the editor with autocomplete, code snippets, color-coded grammar, syntax highlighting, and more! Code faster and with fewer mistakes! 5 | 6 | THIS PACKAGE IS DEPRECATED. THE APM ACCOUNT IT WAS PUBLISHED UNDER WAS CORRUPTED DURING AN APM UPGRADE, AND I AM NO LONGER ABLE TO PUBLISH UPDATES. PLUS, I NO LONGER USE ATOM AS MY PRIMARY CODE EDITOR. FEEL FREE TO FORK AND MAINTAIN IT YOURSELF. 7 | 8 | --------------------------------------- 9 | #### Meteor API Version 10 | 11 | 1.0.3.1 12 | 13 | --------------------------------------- 14 | #### Installation 15 | 16 | Simply go to **Atom > Preferences > Packages**, search for ``Meteor Api``, and install the package! Then just be sure to select ``Javascript (Meteor)`` as your grammar. 17 | 18 | ![Javascript Grammar Select](https://raw.githubusercontent.com/awatson1978/meteor-api/master/screenshots/javascript-meteor-select.png) 19 | 20 | 21 | If you'd like to permanently make all javascript default to the ``Javascript (Meteor)`` grammar, disable the ``language-javascript`` package! 22 | 23 | --------------------------------------- 24 | #### Color Coded Meteor Syntax 25 | 26 | ![Meteor-Api Code Sample](https://raw.githubusercontent.com/awatson1978/meteor-api/master/screenshots/code-sample.png) 27 | 28 | 29 | --------------------------------------- 30 | #### Meteor API Code Snippets 31 | 32 | [Complete List of Covered Meteor API Syntax](https://github.com/awatson1978/meteor-api/blob/master/api.md) 33 | 34 | ![Meteor-Api Grammar](https://raw.githubusercontent.com/awatson1978/meteor-api/master/screenshots/grammar-snippets.png) 35 | 36 | 37 | 38 | --------------------------------------- 39 | #### Setting Up Atom As an Integrated Development Environment 40 | 41 | If you want even more Meteor integration, try installing the following packages for an integrated, isomorphic, pure-javascript development environment. 42 | 43 | ````sh 44 | atom-bootstrap3 45 | atom-handlebars 46 | color-picker 47 | copy-filename 48 | jsformat 49 | language-html 50 | language-spacebars 51 | less-autocompile 52 | line-count 53 | linter 54 | linter-eslint 55 | linter-handlebars 56 | merge-conflicts 57 | meteor-api 58 | meteor-helper 59 | minimap 60 | starrynight-helper 61 | ```` 62 | 63 | 64 | ##### Enabling Handlebars Linting (a bit more hacky) 65 | 66 | 1. go to **Atom > Preferences > Packages**, search for ``linter-handlebars`` and install the package 67 | 2. after the instllation finished, click on the package ``linter-handlebars`` to open its settings page and click on ``View Code`` 68 | 3. edit the file `linter-handlebars/lib/linter-handlebars-provider.coffee` and add `text.html.spacebars` to the list of supported grammars. At the time of writing this list appears on [line 7](https://github.com/AtomLinter/linter-handlebars/blob/v2.0.0/lib/linter-handlebars-provider.coffee#L7): make sure it eventually looks like: 69 | 70 | ````coffeescript 71 | grammarScopes: ['text.html.handlebars', 'source.hbs', 'source.handlebars', 'text.html.spacebars'] 72 | ```` 73 | 74 | Please be aware that you might need to repeat this editing operation everytime the package ``linter-handlebars`` gets updated. 75 | 76 | --------------------------------------- 77 | #### Open Files From the Command Line 78 | 79 | If you haven't created a symlink for atom, try the following snippet to launch Atom from the command line. 80 | 81 | ````sh 82 | # link your atom binary so it can be run from the command line 83 | sudo ln -s /Applications/Atom.app/Contents/MacOS/Atom /usr/local/bin/atom 84 | 85 | # open a file 86 | meteor create helloworld 87 | cd helloworld 88 | atom helloworld.js 89 | ```` 90 | --------------------------------------- 91 | #### Linting Tools 92 | 93 | 1. Install the ``eslint`` node package: 94 | ````sh 95 | npm install -g eslint 96 | ```` 97 | 98 | 2. Install the ``linter``, and ``linter-eslint`` atom packages from 99 | 100 | ````sh 101 | apm install jsformat 102 | apm install linter 103 | apm install linter-eslint 104 | ```` 105 | 106 | 3. Check that the packages are configured correctly. You might need to add ``/usr/local`` as your NPM prefix for ``linter-eslint``. 107 | 108 | 4. Copy over ``.eslintrc``to get started. 109 | 110 | [.eslintrc](https://github.com/yauh/meteor-with-style/blob/master/.eslintrc) 111 | 112 | 113 | 114 | 115 | --------------------------------------- 116 | #### Acknowledgements / Contributors 117 | 118 | A big shoutout to ThusStyles for piecing together the original [meteor-snippets](https://github.com/ThusStyles/meteor-snippets) atom package! And to zaku-eu for [language-spacebars](https://atom.io/packages/language-spacebars)! 119 | 120 | --------------------------------------- 121 | #### Hacking on the Package 122 | 123 | Want to make modifications? Take a look at your ``~/.atom/packages`` directory. You should find ``~/.atom/packages/meteor-api``. Move that somewhere, and clone this repo where it used to be. (You'll want to fork it first to your own account.) 124 | 125 | ````sh 126 | # download the meteor-api package to the correct location 127 | cd ~/.atom/packages 128 | mv meteor-api meteor-api-bkup 129 | git clone http://github.com/damonmcminn/meteor-api 130 | cd meteor-api 131 | 132 | # make sure you're on a feature branch 133 | git branch 134 | git checkout -b syntax-highlighting 135 | 136 | # open a new atom editor in the current directory 137 | # we're using atom to hack on an atom package; spiffy recursive recursive! 138 | atom . 139 | ```` 140 | You'll then want to go into the ``meteor-api/grammars/`` directory and start hacking on ``meteor-api-grammar-javascript.cson`` and the other files there. 141 | 142 | The hotkey command to reload the packages into Atom is ``Control+Option+Command+L``. 143 | 144 | 145 | --------------------------------------- 146 | #### Todo 147 | 148 | - [x] [Blaze Syntax Highlighting](http://stackoverflow.com/questions/22363070/how-do-i-make-a-default-syntax-by-filetype-in-atom-text-editor) 149 | - [x] [Handelbars/Spacebars Syntax](https://atom.io/packages/atom-handlebars) 150 | - [ ] [Meteor Version of Autocomplete](https://atom.io/packages/autocomplete-plus) 151 | - [ ] [Meteor Version of Extract Method](https://atom.io/packages/extract-method) 152 | 153 | 154 | ``ctags -R .`` for extracting method definitions; add ctags file to meteor projects 155 | -------------------------------------------------------------------------------- /settings/language-html.cson: -------------------------------------------------------------------------------- 1 | '.text.html': 2 | 'editor': 3 | 'commentStart': '' 5 | 'foldEndPattern': '(?x)\n\t\t(\n\t\t|^(?!.*?$\n\t\t|<\\?(?:php)?.*\\bend(if|for(each)?|while)\\b\n\t\t|\\{\\{?/(if|foreach|capture|literal|foreach|php|section|strip)\n\t\t|^[^{]*\\}\n\t\t|^\\s*\\)[,;]\n\t\t)' 6 | 'increaseIndentPattern': '(?x) 7 | <(?!\\?|(?:area|base|br|col|frame|hr|html|img|input|link|meta|param)\\b|[^>]*/>) 8 | ([-_\\.A-Za-z0-9]+)(?=\\s|>)\\b[^>]*>(?!.*) 9 | |) 10 | |<\\?php.+?\\b(if|else(?:if)?|for(?:each)?|while)\\b.*:(?!.*end\\1) 11 | |\\{[^}"\']*$ 12 | ' 13 | 'decreaseIndentPattern': '(?x) 14 | ^\\s* 15 | (]*> 17 | |--> 18 | |<\\?(php)?\\s+(else(if)?|end(if|for(each)?|while)) 19 | |\\} 20 | )' 21 | '.text.html .meta.tag:not(.entity.other.attribute-name, .punctuation.definition.tag.begin, .source, .entity.name.tag, .string, .invalid.illegal.incomplete.html)': 22 | 'editor': 23 | 'completions': [ 24 | 'ABBR' 25 | 'abbr' 26 | 'ABOVE' 27 | 'above' 28 | 'ACCEPT' 29 | 'accept' 30 | 'ACCESSKEY' 31 | 'accesskey' 32 | 'ACTION' 33 | 'action' 34 | 'ALIGN' 35 | 'align' 36 | 'ALINK' 37 | 'alink' 38 | 'ALT' 39 | 'alt' 40 | 'ARCHIVE' 41 | 'archive' 42 | 'AUTOSTART' 43 | 'autostart' 44 | 'AXIS' 45 | 'axis' 46 | 'BACKGROUND' 47 | 'background' 48 | 'BALANCE' 49 | 'balance' 50 | 'BEHAVIOR' 51 | 'behavior' 52 | 'BELOW' 53 | 'below' 54 | 'BGCOLOR' 55 | 'bgcolor' 56 | 'BGPROPERTIES' 57 | 'bgproperties' 58 | 'BORDER' 59 | 'border' 60 | 'BORDERCOLOR' 61 | 'bordercolor' 62 | 'BORDERCOLORDARK' 63 | 'bordercolordark' 64 | 'BORDERCOLORLIGHT' 65 | 'bordercolorlight' 66 | 'BOTTOMMARGIN' 67 | 'bottommargin' 68 | 'CABBASE' 69 | 'cabbase' 70 | 'CELLPADDING' 71 | 'cellpadding' 72 | 'CELLSPACING' 73 | 'cellspacing' 74 | 'CHARSET' 75 | 'charset' 76 | 'CHECKED' 77 | 'checked' 78 | 'CITE' 79 | 'cite' 80 | 'CLASS' 81 | 'class' 82 | 'CLASSID' 83 | 'classid' 84 | 'CLEAR' 85 | 'clear' 86 | 'CLIP' 87 | 'clip' 88 | 'CODE' 89 | 'code' 90 | 'CODEBASE' 91 | 'codebase' 92 | 'CODETYPE' 93 | 'codetype' 94 | 'COLOR' 95 | 'color' 96 | 'COLS' 97 | 'cols' 98 | 'COLSPAN' 99 | 'colspan' 100 | 'COMPACT' 101 | 'compact' 102 | 'CONTENT' 103 | 'content' 104 | 'CONTROLS' 105 | 'controls' 106 | 'COORDS' 107 | 'coords' 108 | 'DATA' 109 | 'data' 110 | 'DATAPAGESIZE' 111 | 'datapagesize' 112 | 'DATETIME' 113 | 'datetime' 114 | 'DECLARE' 115 | 'declare' 116 | 'DEFER' 117 | 'defer' 118 | 'DELAY' 119 | 'delay' 120 | 'DIR' 121 | 'dir' 122 | 'DIRECTION' 123 | 'direction' 124 | 'DISABLED' 125 | 'disabled' 126 | 'DYNSRC' 127 | 'dynsrc' 128 | 'ENCTYPE' 129 | 'enctype' 130 | 'FACE' 131 | 'face' 132 | 'FOR' 133 | 'for' 134 | 'FRAME' 135 | 'frame' 136 | 'FRAMEBORDER' 137 | 'frameborder' 138 | 'FRAMESPACING' 139 | 'framespacing' 140 | 'GUTTER' 141 | 'gutter' 142 | 'HEADERS' 143 | 'headers' 144 | 'HEIGHT' 145 | 'height' 146 | 'HIDDEN' 147 | 'hidden' 148 | 'HREF' 149 | 'href' 150 | 'HREFLANG' 151 | 'hreflang' 152 | 'HSPACE' 153 | 'hspace' 154 | 'HTTP-EQUIV' 155 | 'http-equiv' 156 | 'ID' 157 | 'id' 158 | 'ISMAP' 159 | 'ismap' 160 | 'LABEL' 161 | 'label' 162 | 'LANG' 163 | 'lang' 164 | 'lang' 165 | 'language' 166 | 'LEFT' 167 | 'left' 168 | 'LEFTMARGIN' 169 | 'leftmargin' 170 | 'LINK' 171 | 'link' 172 | 'LONGDESC' 173 | 'longdesc' 174 | 'LOOP' 175 | 'loop' 176 | 'LOWSRC' 177 | 'lowsrc' 178 | 'MARGINHEIGHT' 179 | 'marginheight' 180 | 'MARGINWIDTH' 181 | 'marginwidth' 182 | 'MAXLENGTH' 183 | 'maxlength' 184 | 'MAYSCRIPT' 185 | 'mayscript' 186 | 'MEDIA' 187 | 'media' 188 | 'METHOD' 189 | 'method' 190 | 'MULTIPLE' 191 | 'multiple' 192 | 'NAME' 193 | 'name' 194 | 'NOEXTERNALDATA' 195 | 'noexternaldata' 196 | 'NORESIZE' 197 | 'noresize' 198 | 'NOSHADE' 199 | 'noshade' 200 | 'NOWRAP' 201 | 'nowrap' 202 | 'onBlur' 203 | 'onblur' 204 | 'onChange' 205 | 'onchange' 206 | 'onClick' 207 | 'onclick' 208 | 'onDblClick' 209 | 'ondblclick' 210 | 'onError' 211 | 'onerror' 212 | 'onFocus' 213 | 'onfocus' 214 | 'onKeyDown' 215 | 'onkeydown' 216 | 'onKeyPress' 217 | 'onkeypress' 218 | 'onKeyUp' 219 | 'onkeyup' 220 | 'onLoad' 221 | 'onload' 222 | 'onMouseDown' 223 | 'onmousedown' 224 | 'onMouseMove' 225 | 'onmousemove' 226 | 'onMouseOut' 227 | 'onmouseout' 228 | 'onMouseOver' 229 | 'onmouseover' 230 | 'onMouseUp' 231 | 'onmouseup' 232 | 'onReset' 233 | 'onreset' 234 | 'onResize' 235 | 'onresize' 236 | 'onSelect' 237 | 'onselect' 238 | 'onSubmit' 239 | 'onsubmit' 240 | 'onUnload' 241 | 'onunload' 242 | 'PAGEX' 243 | 'pagex' 244 | 'PAGEY' 245 | 'pagey' 246 | 'POINTSIZE' 247 | 'pointsize' 248 | 'READONLY' 249 | 'readonly' 250 | 'REL' 251 | 'rel' 252 | 'REV' 253 | 'rev' 254 | 'RIGHTMARGIN' 255 | 'rightmargin' 256 | 'ROWS' 257 | 'rows' 258 | 'ROWSPAN' 259 | 'rowspan' 260 | 'RULES' 261 | 'rules' 262 | 'runat' 263 | 'SCOPE' 264 | 'scope' 265 | 'SCROLLAMOUNT' 266 | 'scrollamount' 267 | 'SCROLLDELAY' 268 | 'scrolldelay' 269 | 'SCROLLING' 270 | 'scrolling' 271 | 'SELECTED' 272 | 'selected' 273 | 'SHAPE' 274 | 'shape' 275 | 'SIZE' 276 | 'size' 277 | 'SPAN' 278 | 'span' 279 | 'SRC' 280 | 'src' 281 | 'STANDBY' 282 | 'standby' 283 | 'START' 284 | 'start' 285 | 'STYLE' 286 | 'style' 287 | 'SUMMARY' 288 | 'summary' 289 | 'TABINDEX' 290 | 'tabindex' 291 | 'TARGET' 292 | 'target' 293 | 'TEXT' 294 | 'text' 295 | 'TITLE' 296 | 'title' 297 | 'TOP' 298 | 'top' 299 | 'TOPMARGIN' 300 | 'topmargin' 301 | 'TRUESPEED' 302 | 'truespeed' 303 | 'TYPE' 304 | 'type' 305 | 'USEMAP' 306 | 'usemap' 307 | 'VALIGN' 308 | 'valign' 309 | 'VALUE' 310 | 'value' 311 | 'VALUETYPE' 312 | 'valuetype' 313 | 'VISIBILITY' 314 | 'visibility' 315 | 'VLINK' 316 | 'vlink' 317 | 'VOLUME' 318 | 'volume' 319 | 'VSPACE' 320 | 'vspace' 321 | 'WIDTH' 322 | 'width' 323 | 'WRAP' 324 | 'wrap' 325 | 'xml:lang' 326 | 'xmlns' 327 | 'Z-INDEX' 328 | 'z-index' 329 | ] 330 | -------------------------------------------------------------------------------- /snippets/meteor-api-snippets-html.cson: -------------------------------------------------------------------------------- 1 | # Your snippets 2 | # 3 | # Atom snippets allow you to enter a simple prefix in the editor and hit tab to 4 | # expand the prefix into a larger code block with templated values. 5 | # 6 | # You can create a new snippet in this file by typing "snip" and then hitting 7 | # tab. 8 | # 9 | # An example CoffeeScript snippet to expand log to console.log: 10 | # 11 | # '.source.coffee': 12 | # 'Console log': 13 | # 'prefix': 'log' 14 | # 'body': 'console.log $1' 15 | # 16 | 17 | 18 | 19 | 20 | #=================================================== 21 | # HTML / Document Object Model Snippets: 22 | 23 | '.text.html': 24 | # A 25 | 'Anchor': 26 | 'prefix': 'a' 27 | 'body': '$2$0' 28 | 'Abbreviation': 29 | 'prefix': 'abbr' 30 | 'body': '$2$0' 31 | 'Address': 32 | 'prefix': 'address' 33 | 'body': '
\n\t$3\n
' 34 | 'Area': 35 | 'prefix': 'area' 36 | 'body': '$0' 37 | 'Article': 38 | 'prefix': 'article' 39 | 'body': '
\n\t$2\n
' 40 | 'Aside': 41 | 'prefix': 'aside' 42 | 'body': '' 43 | 'Audio': 44 | 'prefix': 'audio' 45 | 'body': '' 46 | # B 47 | 'Bold': 48 | 'prefix': 'b' 49 | 'body': '$1$0' 50 | 'Base': 51 | 'prefix': 'base' 52 | 'body': '$0' 53 | 'Bi-Directional Isolation': 54 | 'prefix': 'bdi' 55 | 'body': '$2$0' 56 | 'Bi-Directional Override': 57 | 'prefix': 'bdo' 58 | 'body': '$2$0' 59 | 'Blockquote': 60 | 'prefix': 'blockquote' 61 | 'body': '
\n\t$2\n
' 62 | 'Line Breaker': 63 | 'prefix': 'br' 64 | 'body': '
' 65 | 'Button': 66 | 'prefix': 'button' 67 | 'body': '$0' 68 | # C 69 | 'Canvas': 70 | 'prefix': 'canvas' 71 | 'body': '$4$0' 72 | 'Caption': 73 | 'prefix': 'caption' 74 | 'body': '$1$0' 75 | 'Citation': 76 | 'prefix': 'cite' 77 | 'body': '$1$0' 78 | 'Code': 79 | 'prefix': 'code' 80 | 'body': '$1$0' 81 | 'Column': 82 | 'prefix': 'col' 83 | 'body': '$1$0' 84 | 'Column Group': 85 | 'prefix': 'colgroup' 86 | 'body': '$1$0' 87 | 'Content': 88 | 'prefix': 'content' 89 | 'body': '$2$0' 90 | 'Comment': 91 | 'prefix': '--' 92 | 'body': '$0' 93 | # D 94 | 'HTML — 5': 95 | 'prefix': 'doctype' 96 | 'body': '\n' 97 | 'Data': 98 | 'prefix': 'data' 99 | 'body': '$2$0' 100 | 'Data List': 101 | 'prefix': 'datalist' 102 | 'body': '\n\t$2\n' 103 | 'Description': 104 | 'prefix': 'dd' 105 | 'body': '
$1
$0' 106 | 'Deleted Text': 107 | 'prefix': 'del' 108 | 'body': '$1$0' 109 | 'Details': 110 | 'prefix': 'details' 111 | 'body': '
$2
$0' 112 | 'Definition': 113 | 'prefix': 'dfn' 114 | 'body': '$1$0' 115 | 'Description List': 116 | 'prefix': 'dl' 117 | 'body': '
\n\t$2\n
' 118 | 'Definition Term': 119 | 'prefix': 'dt' 120 | 'body': '
$1
$0' 121 | 'Div': 122 | 'prefix': 'div' 123 | 'body': '\n\t$3\n' 124 | # E 125 | 'Emphasis': 126 | 'prefix': 'em' 127 | 'body': '$1$0' 128 | 'Embed': 129 | 'prefix': 'embed' 130 | 'body': '$0' 131 | # F 132 | 'Fieldset': 133 | 'prefix': 'fieldset' 134 | 'body': '
$1
$0' 135 | 'Figure Caption': 136 | 'prefix': 'figcaption' 137 | 'body': '
$1
$0' 138 | 'Figure': 139 | 'prefix': 'figure' 140 | 'body': '
$1
$0' 141 | 'Footer': 142 | 'prefix': 'footer' 143 | 'body': '
$1
$0' 144 | 'Form': 145 | 'prefix': 'form' 146 | 'body': '
\n\t$4\n
' 147 | # G 148 | # H 149 | 'Heading 1': 150 | 'prefix': 'h1' 151 | 'body': '

$1

$0' 152 | 'Heading 2': 153 | 'prefix': 'h2' 154 | 'body': '

$1

$0' 155 | 'Heading 3': 156 | 'prefix': 'h3' 157 | 'body': '

$1

$0' 158 | 'Heading 4': 159 | 'prefix': 'h4' 160 | 'body': '

$1

$0' 161 | 'Heading 5': 162 | 'prefix': 'h5' 163 | 'body': '
$1
$0' 164 | 'Heading 6': 165 | 'prefix': 'h6' 166 | 'body': '
$1
$0' 167 | 'Head': 168 | 'prefix': 'head' 169 | 'body': '\n\t$1\n' 170 | 'Header': 171 | 'prefix': 'header' 172 | 'body': '
\n\t$1\n
' 173 | 'Horizontal Rule': 174 | 'prefix': 'hr' 175 | 'body': '
' 176 | 'HTML': 177 | 'prefix': 'html' 178 | 'body': '\n\t\n\t\t$1\n\t\n\t\n\t\t$2\n\t\n' 179 | # I 180 | 'Italic': 181 | 'prefix': 'i' 182 | 'body': '$1$0' 183 | 'Inline Frame': 184 | 'prefix': 'iframe' 185 | 'body': '$0' 186 | 'Input': 187 | 'prefix': 'input' 188 | 'body': '$0' 189 | 'Image': 190 | 'prefix': 'img' 191 | 'body': '$2$0' 192 | 'Inserted Text': 193 | 'prefix': 'ins' 194 | 'body': '$1$0' 195 | # J 196 | # K 197 | 'Keyboard Input': 198 | 'prefix': 'kbd' 199 | 'body': '$1$0' 200 | 'Keygen': 201 | 'prefix': 'keygen' 202 | 'body': '$0' 203 | # L 204 | 'Label': 205 | 'prefix': 'label' 206 | 'body': '$0' 207 | 'Legend': 208 | 'prefix': 'legend' 209 | 'body': '$1$0' 210 | 'List Item': 211 | 'prefix': 'li' 212 | 'body': '
  • $1
  • $0' 213 | 'Link': 214 | 'prefix': 'link' 215 | 'body': '$0' 216 | # M 217 | 'Main': 218 | 'prefix': 'main' 219 | 'body': '
    \n\t$1\n
    ' 220 | 'Map': 221 | 'prefix': 'map' 222 | 'body': '\n\t$1\n' 223 | 'Mark': 224 | 'prefix': 'mark' 225 | 'body': '$1$0' 226 | 'Menu': 227 | 'prefix': 'menu' 228 | 'body': '\n\t$1\n' 229 | 'Menu Item': 230 | 'prefix': 'menuitem' 231 | 'body': '$0' 232 | 'Meter': 233 | 'prefix': 'meter' 234 | 'body': '$0' 235 | 'Mail Anchor': 236 | 'prefix': 'mailto' 237 | 'body': '${3:email me}$0' 238 | 'Meta': 239 | 'prefix': 'meta' 240 | 'body': '$0' 241 | # N 242 | 'Navigation': 243 | 'prefix': 'nav' 244 | 'body': '' 245 | 'Noscript': 246 | 'prefix': 'noscript' 247 | 'body': '' 248 | # O 249 | 'Object': 250 | 'prefix': 'object' 251 | 'body': '$3$0' 252 | 'Ordered List': 253 | 'prefix': 'ol' 254 | 'body': '
      \n\t$1\n
    ' 255 | 'Option Group': 256 | 'prefix': 'optgroup' 257 | 'body': '\n\t$2\n' 258 | 'Option': 259 | 'prefix': 'opt' 260 | 'body': '${3:option}$0' 261 | 'Output': 262 | 'prefix': 'output' 263 | 'body': '$2$0' 264 | # P 265 | 'Paragraph': 266 | 'prefix': 'p' 267 | 'body': '

    \n\t$1\n

    ' 268 | 'Parameter': 269 | 'prefix': 'param' 270 | 'body': '$0' 271 | 'Preformatted Text': 272 | 'prefix': 'pre' 273 | 'body': '
    \n\t$1\n
    ' 274 | 'Progress': 275 | 'prefix': 'progress' 276 | 'body': '${3:50%}$0' 277 | # Q 278 | 'Quote': 279 | 'prefix': 'q' 280 | 'body': '$2$0' 281 | # R 282 | 'Ruby Parenthesis': 283 | 'prefix': 'rp' 284 | 'body': '$1$0' 285 | 'Ruby Pronunciation': 286 | 'prefix': 'rt' 287 | 'body': '$1$0' 288 | 'Ruby Annotation': 289 | 'prefix': 'ruby' 290 | 'body': '$1$0' 291 | # S 292 | 'Strikethrough': 293 | 'prefix': 's' 294 | 'body': '$1$0' 295 | 'Sample Output': 296 | 'prefix': 'samp' 297 | 'body': '$1$0' 298 | 'Script': 299 | 'prefix': 'script' 300 | 'body': '' 301 | 'Script With External Source': 302 | 'prefix': 'scriptsrc' 303 | 'body': '$0' 304 | 'Section': 305 | 'prefix': 'section' 306 | 'body': '
    \n\t$1\n
    ' 307 | 'Select': 308 | 'prefix': 'select' 309 | 'body': '' 310 | 'Small': 311 | 'prefix': 'small' 312 | 'body': '$1$0' 313 | 'Source': 314 | 'prefix': 'source' 315 | 'body': '$0' 316 | 'Span': 317 | 'prefix': 'span' 318 | 'body': '$1$0' 319 | 'Strong': 320 | 'prefix': 'strong' 321 | 'body': '$1$0' 322 | 'Style': 323 | 'prefix': 'style' 324 | 'body': '' 325 | 'Subscript': 326 | 'prefix': 'sub' 327 | 'body': '$1$0' 328 | 'Summary': 329 | 'prefix': 'summary' 330 | 'body': '$1$0' 331 | 'Superscript': 332 | 'prefix': 'sup' 333 | 'body': '$1$0' 334 | # T 335 | 'Table': 336 | 'prefix': 'table' 337 | 'body': '\n\t$1\n
    ' 338 | 'Table Body': 339 | 'prefix': 'tbody' 340 | 'body': '\n\t$1\n' 341 | 'Table Cell': 342 | 'prefix': 'td' 343 | 'body': '\n\t$1\n' 344 | 'Template': 345 | 'prefix': 'template' 346 | 'body': '' 347 | 'Text Area': 348 | 'prefix': 'textarea' 349 | 'body': '$0' 350 | 'Table Foot': 351 | 'prefix': 'tfoot' 352 | 'body': '\n\t$1\n' 353 | 'Table Header Cell': 354 | 'prefix': 'th' 355 | 'body': '\n\t$1\n' 356 | 'Table Head': 357 | 'prefix': 'thead' 358 | 'body': '\n\t$1\n' 359 | 'Time': 360 | 'prefix': 'time' 361 | 'body': '$0' 362 | 'Table Row': 363 | 'prefix': 'tr' 364 | 'body': '\n\t$1\n' 365 | 'Track': 366 | 'prefix': 'track' 367 | 'body': '$0' 368 | # U 369 | 'Underline': 370 | 'prefix': 'u' 371 | 'body': '$1$0' 372 | 'Unordered List': 373 | 'prefix': 'ul' 374 | 'body': '
      \n\t$1\n
    ' 375 | # V 376 | 'Variable': 377 | 'prefix': 'var' 378 | 'body': '$1$0' 379 | 'Video': 380 | 'prefix': 'video' 381 | 'body': '' 382 | # W 383 | 'Word Break Opportunity': 384 | 'prefix': 'wbr' 385 | 'body': '' 386 | '.text.html:not(.meta.tag)': 387 | 'Body': 388 | 'prefix': 'body' 389 | 'body': '\n\t$1\n' 390 | '.text.html:not(.text.blog)': 391 | 'Title': 392 | 'prefix': 'title' 393 | 'body': '${1:Page Title}$0' 394 | -------------------------------------------------------------------------------- /grammars/meteor-api-grammar-html.cson: -------------------------------------------------------------------------------- 1 | 'scopeName': 'text.html.basic' 2 | 'fileTypes': [ 3 | 'htm' 4 | 'html' 5 | 'kit' 6 | 'shtml' 7 | 'tmpl' 8 | 'tpl' 9 | 'xhtml' 10 | ] 11 | 'firstLineMatch': '<(?i:(!DOCTYPE\\s*)?html)' 12 | 'name': 'HTML' 13 | 'patterns': [ 14 | { 15 | 'begin': '(<)([a-zA-Z0-9:-]++)(?=[^>]*>)' 16 | 'beginCaptures': 17 | '1': 18 | 'name': 'punctuation.definition.tag.html' 19 | '2': 20 | 'name': 'entity.name.tag.html' 21 | 'end': '(>(<)/)(\\2)(>)' 22 | 'endCaptures': 23 | '1': 24 | 'name': 'punctuation.definition.tag.html' 25 | '2': 26 | 'name': 'meta.scope.between-tag-pair.html' 27 | '3': 28 | 'name': 'entity.name.tag.html' 29 | '4': 30 | 'name': 'punctuation.definition.tag.html' 31 | 'name': 'meta.tag.any.html' 32 | 'patterns': [ 33 | { 34 | 'include': '#tag-stuff' 35 | } 36 | ] 37 | } 38 | { 39 | 'begin': '(<\\?)(xml)' 40 | 'captures': 41 | '1': 42 | 'name': 'punctuation.definition.tag.html' 43 | '2': 44 | 'name': 'entity.name.tag.xml.html' 45 | 'end': '(\\?>)' 46 | 'name': 'meta.tag.preprocessor.xml.html' 47 | 'patterns': [ 48 | { 49 | 'include': '#tag-generic-attribute' 50 | } 51 | { 52 | 'include': '#string-double-quoted' 53 | } 54 | { 55 | 'include': '#string-single-quoted' 56 | } 57 | ] 58 | } 59 | { 60 | 'begin': ')' 353 | 'name': 'comment.block.html.js' 354 | } 355 | # { 356 | # 'match': '(?=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|(?