├── .gitignore └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ✂️ Save time with some snippets! 2 | 3 | Here are some useful snippets for writing posts for Alligator.io. Each snippet has a version for Atom, VS Code and Sublime Text. Sorry VI users 😆! 4 | 5 | Thanks to [this snippet generator](https://github.com/pawelgrzybek/snippet-generator) for making it easy! 6 | 7 | ## Table of contents 8 | 9 | * [Jekyll front matter](#jekyll-front-matter) 10 | * [Atom](#atom) 11 | * [VS Code](#vs-code) 12 | * [Sublime Text](#sublime-text) 13 | * [Bullet points](#bullet-points) 14 | * [Atom](#atom-1) 15 | * [VS Code](#vs-code-1) 16 | * [Sublime Text](#sublime-text-1) 17 | * [Code snippets](#code-snippets) 18 | * [Atom](#atom-2) 19 | * [VS Code](#vs-code-2) 20 | * [Sublime Text](#sublime-text-2) 21 | * [Raw](#raw) 22 | * [Atom](#atom-3) 23 | * [VS Code](#vs-code-3) 24 | * [Sublime Text](#sublime-text-3) 25 | * [Single-line Code Annotation](#single-line-code-annotation) 26 | * [Atom](#atom-4) 27 | * [VS Code](#vs-code-4) 28 | * [Sublime Text](#sublime-text-4) 29 | * [Block Code Annotation](#block-code-annotation) 30 | * [Atom](#atom-5) 31 | * [VS Code](#vs-code-5) 32 | * [Sublime Text](#sublime-text-5) 33 | * [Info Box](#info-box) 34 | * [Atom](#atom-6) 35 | * [VS Code](#vs-code-6) 36 | * [Sublime Text](#sublime-text-6) 37 | * [Warning Box](#warning-box) 38 | * [Atom](#atom-7) 39 | * [VS Code](#vs-code-7) 40 | * [Sublime Text](#sublime-text-7) 41 | * [Success Box](#success-box) 42 | * [Atom](#atom-8) 43 | * [VS Code](#vs-code-8) 44 | * [Sublime Text](#sublime-text-8) 45 | * [File Description](#file-description) 46 | * [Atom](#atom-9) 47 | * [VS Code](#vs-code-9) 48 | * [Sublime Text](#sublime-text-9) 49 | * [Post Image](#post-image) 50 | * [Atom](#atom-10) 51 | * [VS Code](#vs-code-10) 52 | * [Sublime Text](#sublime-text-10) 53 | * [Lazy Post Image](#lazy-post-image) 54 | * [Atom](#atom-11) 55 | * [VS Code](#vs-code-11) 56 | * [Sublime Text](#sublime-text-11) 57 | * [Collapsible](#collapsible) 58 | * [Atom](#atom-12) 59 | * [VS Code](#vs-code-12) 60 | * [Sublime Text](#sublime-text-12) 61 | * [Parting Thoughts](#parting-thoughts) 62 | * [Atom](#atom-13) 63 | * [VS Code](#vs-code-13) 64 | * [Sublime Text](#sublime-text-13) 65 | 66 | ## Jekyll front matter 67 | 68 | ### Atom 69 | 70 | ``` 71 | 'Jekyll front matter': 72 | 'prefix': 'frontmatter' 73 | 'body': """ 74 | --- 75 | layout: page-fullwidth 76 | title: "${1:Using JavaScript to Make Crispy Bacon}" 77 | categories: 78 | - ${2:JS} 79 | tags: 80 | - ${3:bacon} 81 | header: no 82 | breadcrumb: true 83 | meta_description: "${4:Description in the range of 80 to 155 characters.}" 84 | author: ${5:john_d} 85 | --- 86 | """ 87 | ``` 88 | 89 | ### VS Code 90 | 91 | ``` 92 | "Jekyll front matter": { 93 | "prefix": "frontmatter", 94 | "body": [ 95 | "---", 96 | "layout: page-fullwidth", 97 | "title: \"${1:Using JavaScript to Make Crispy Bacon}\"", 98 | "categories:", 99 | " - ${2:JS}", 100 | "tags:", 101 | " - ${3:bacon}", 102 | "header: no", 103 | "breadcrumb: true", 104 | "meta_description: \"${4:Description in the range of 80 to 155 characters.}\"", 105 | "author: ${5:john_d}", 106 | "---" 107 | ], 108 | "description": "Jekyll front matter" 109 | } 110 | ``` 111 | 112 | ### Sublime Text 113 | 114 | ``` 115 | 116 | 130 | Jekyll front matter 131 | frontmatter 132 | 133 | 134 | 135 | ``` 136 | 137 | ## Bullet points 138 | 139 | ### Atom 140 | 141 | ``` 142 | 'Bullet Point': 143 | 'prefix': 'bullet' 144 | 'body': """ 145 | * *${1:Point 1}*: ${2:Text for point 1} 146 | """ 147 | ``` 148 | 149 | ### VS Code 150 | 151 | ``` 152 | "Bullet Point": { 153 | "prefix": "bullet", 154 | "body": [ 155 | "* *${1:Point 1}*: ${2:Text for point 1}" 156 | ], 157 | "description": "Bullet Point" 158 | } 159 | ``` 160 | 161 | ### Sublime Text 162 | 163 | ``` 164 | 165 | 168 | Bullet Point 169 | bullet 170 | 171 | 172 | 173 | ``` 174 | 175 | ## Code snippets 176 | 177 | ### Atom 178 | 179 | ``` 180 | 'Code snippet': 181 | 'prefix': 'snippet' 182 | 'body': """ 183 |
${2:your code here}
184 | """ 185 | ``` 186 | 187 | ### VS Code 188 | 189 | ``` 190 | "Code snippet": { 191 | "prefix": "snippet", 192 | "body": [ 193 | "
${2:your code here}
" 194 | ], 195 | "description": "Code snippet" 196 | } 197 | ``` 198 | 199 | ### Sublime Text 200 | 201 | ``` 202 | 203 | ${2:your code here} 205 | ]]> 206 | Code snippet 207 | snippet 208 | 209 | 210 | 211 | ``` 212 | 213 | ## Raw 214 | 215 | Liquid tags to escape mustache syntax: 216 | 217 | ### Atom 218 | 219 | ``` 220 | 'Raw': 221 | 'prefix': 'raw' 222 | 'body': """ 223 | {% raw %}${1:your mustache-escaped content here}{% endraw %} 224 | """ 225 | ``` 226 | 227 | ### VS Code 228 | 229 | ``` 230 | "Raw": { 231 | "prefix": "raw", 232 | "body": [ 233 | "{% raw %}${1:your mustache-escaped content here}{% endraw %}" 234 | ], 235 | "description": "Raw" 236 | } 237 | ``` 238 | 239 | ### Sublime Text 240 | 241 | ``` 242 | 243 | 246 | Raw 247 | raw 248 | 249 | 250 | 251 | ``` 252 | 253 | ## Single-line Code Annotation 254 | 255 | ### Atom 256 | 257 | ``` 258 | 'annotation': 259 | 'prefix': 'annotation' 260 | 'body': """ 261 | ${1:your annotated code} 262 | """ 263 | ``` 264 | 265 | ### VS Code 266 | 267 | ``` 268 | "annotation": { 269 | "prefix": "annotation", 270 | "body": [ 271 | "${1:your annotated code}" 272 | ], 273 | "description": "annotation" 274 | } 275 | ``` 276 | 277 | ### Sublime Text 278 | 279 | ``` 280 | 281 | ${1:your annotated code} 283 | ]]> 284 | annotation 285 | annotation 286 | 287 | 288 | 289 | ``` 290 | 291 | ## Block Code Annotation 292 | 293 | ### Atom 294 | 295 | ``` 296 | 'Block annotation': 297 | 'prefix': 'block-annotation' 298 | 'body': """ 299 | ${1:your annotated block} 300 | """ 301 | ``` 302 | 303 | ### VS Code 304 | 305 | ``` 306 | "Block annotation": { 307 | "prefix": "block-annotation", 308 | "body": [ 309 | "${1:your annotated block}" 310 | ], 311 | "description": "Block annotation" 312 | } 313 | ``` 314 | 315 | ### Sublime Text 316 | 317 | ``` 318 | 319 | ${1:your annotated block} 321 | ]]> 322 | Block annotation 323 | block-annotation 324 | 325 | 326 | 327 | ``` 328 | 329 | ## Info Box 330 | 331 | ### Atom 332 | 333 | ``` 334 | 'Info box': 335 | 'prefix': 'info-box' 336 | 'body': """ 337 |

338 | ${1:content here} 339 |

340 | """ 341 | ``` 342 | 343 | ### VS Code 344 | 345 | ``` 346 | "Info box": { 347 | "prefix": "info-box", 348 | "body": [ 349 | "

", 350 | " ${1:content here}", 351 | "

" 352 | ], 353 | "description": "Info box" 354 | } 355 | ``` 356 | 357 | ### Sublime Text 358 | 359 | ``` 360 | 361 | 363 | ${1:content here} 364 |

365 | ]]>
366 | Info box 367 | info-box 368 | 369 | 370 |
371 | ``` 372 | 373 | ## Warning Box 374 | 375 | ### Atom 376 | 377 | ``` 378 | 'Warning box': 379 | 'prefix': 'warning-box' 380 | 'body': """ 381 |

382 | ${1:content here} 383 |

384 | """ 385 | ``` 386 | 387 | ### VS Code 388 | 389 | ``` 390 | "Warning box": { 391 | "prefix": "warning-box", 392 | "body": [ 393 | "

", 394 | " ${1:content here}", 395 | "

" 396 | ], 397 | "description": "Warning box" 398 | } 399 | ``` 400 | 401 | ### Sublime Text 402 | 403 | ``` 404 | 405 | 407 | ${1:content here} 408 |

409 | ]]>
410 | Warning box 411 | warning-box 412 | 413 | 414 |
415 | ``` 416 | 417 | ## Success Box 418 | 419 | ### Atom 420 | 421 | ``` 422 | 'Success box': 423 | 'prefix': 'success-box' 424 | 'body': """ 425 |

426 | ${1:content here} 427 |

428 | """ 429 | ``` 430 | 431 | ### VS Code 432 | 433 | ``` 434 | "Success box": { 435 | "prefix": "success-box", 436 | "body": [ 437 | "

", 438 | " ${1:content here}", 439 | "

" 440 | ], 441 | "description": "Success box" 442 | } 443 | ``` 444 | 445 | ### Sublime Text 446 | 447 | ``` 448 | 449 | 451 | ${1:content here} 452 |

453 | ]]>
454 | Success box 455 | success-box 456 | 457 | 458 |
459 | ``` 460 | 461 | ## File Description 462 | 463 | ### Atom 464 | 465 | ``` 466 | 'File description': 467 | 'prefix': 'file-description' 468 | 'body': """ 469 |

${1:file-name.js}

470 | """ 471 | ``` 472 | 473 | ### VS Code 474 | 475 | ``` 476 | "File description": { 477 | "prefix": "file-description", 478 | "body": [ 479 | "

${1:file-name.js}

" 480 | ], 481 | "description": "File description" 482 | } 483 | ``` 484 | 485 | ### Sublime Text 486 | 487 | ``` 488 | 489 | ${1:file-name.js}

491 | ]]>
492 | File description 493 | file-description 494 | 495 | 496 |
497 | ``` 498 | 499 | ## Post Image 500 | 501 | ### Atom 502 | 503 | ``` 504 | 'image': 505 | 'prefix': 'post-image' 506 | 'body': """ 507 |

508 | ${4:image description} 509 |

510 | """ 511 | ``` 512 | 513 | ### VS Code 514 | 515 | ``` 516 | "image": { 517 | "prefix": "post-image", 518 | "body": [ 519 | "

", 520 | " \"${4:image", 521 | "

" 522 | ], 523 | "description": "image" 524 | } 525 | ``` 526 | 527 | ### Sublime Text 528 | 529 | ``` 530 | 531 | 533 | ${4:image description} 534 |

535 | ]]>
536 | image 537 | post-image 538 | 539 | 540 |
541 | ``` 542 | 543 | ## Lazy Post Image 544 | 545 | ### Atom 546 | 547 | ``` 548 | 'Lazy image': 549 | 'prefix': 'post-image-lazy' 550 | 'body': """ 551 |

552 | ${4:image description} 553 |

554 | """ 555 | ``` 556 | 557 | ### VS Code 558 | 559 | ``` 560 | "Lazy image": { 561 | "prefix": "post-image-lazy", 562 | "body": [ 563 | "

", 564 | " \"${4:image", 565 | "

" 566 | ], 567 | "description": "Lazy image" 568 | } 569 | ``` 570 | 571 | ### Sublime Text 572 | 573 | ``` 574 | 575 | 577 | ${4:image description} 578 |

579 | ]]>
580 | Lazy image 581 | post-image-lazy 582 | 583 | 584 |
585 | ``` 586 | 587 | ## Collapsible 588 | 589 | ### Atom 590 | 591 | ``` 592 | 'Collapsible': 593 | 'prefix': 'collapsible' 594 | 'body': """ 595 | 596 |

${2:content here}

597 |
598 | """ 599 | ``` 600 | 601 | ### VS Code 602 | 603 | ``` 604 | "Collapsible": { 605 | "prefix": "collapsible", 606 | "body": [ 607 | "", 608 | "

${2:content here}

", 609 | "
" 610 | ], 611 | "description": "Collapsible" 612 | } 613 | ``` 614 | 615 | ### Sublime Text 616 | 617 | ``` 618 | 619 | 621 |

${2:content here}

622 | 623 | ]]>
624 | Collapsible 625 | collapsible 626 | 627 | 628 |
629 | ``` 630 | 631 | ## Parting Thoughts 632 | 633 | ### Atom 634 | 635 | ``` 636 | 'Parting thoughts': 637 | 'prefix': 'parting-thoughts' 638 | 'body': """ 639 |

640 | ${1:your text here} 641 |

642 | """ 643 | ``` 644 | 645 | ### VS Code 646 | 647 | ``` 648 | "Parting thoughts": { 649 | "prefix": "parting-thoughts", 650 | "body": [ 651 | "

", 652 | " ${1:your text here}", 653 | "

" 654 | ], 655 | "description": "Parting thoughts" 656 | } 657 | ``` 658 | 659 | ### Sublime Text 660 | 661 | ``` 662 | 663 | 665 | ${1:your text here} 666 |

667 | ]]>
668 | Parting thoughts 669 | parting-thoughts 670 | 671 | 672 |
673 | ``` 674 | --------------------------------------------------------------------------------