nedf23
3/24/2017 - 9:40 PM

Atom Snippets

Atom Snippets

# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
# '.source.coffee':
#   'Console log':
#     'prefix': 'log'
#     'body': 'console.log $1'
#
# Each scope (e.g. '.source.coffee' above) can only be declared once.
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it in the
# Atom Flight Manual:
# http://flight-manual.atom.io/using-atom/sections/basic-customization/#_cson
'*':
    'Test Class':
        'prefix': 'testclass'
        'body': """<?php

            namespace Tests\\Feature;

            use Tests\\TestCase;
            use Illuminate\\Foundation\\Testing\\DatabaseMigrations;

            class ${1:TestName}Test extends TestCase
            {
                use DatabaseMigrations;

                public function test${2:TestForWhat}()
                {
                    $3
                }$4
            }
        """

    'Bootstrap Input':
        'prefix': 'bstext'
        'body': """<div class="form-group">
                <label for="${1:name}">${2:title}</label>
                <input type="text" class="form-control" id="${1:name}" name="${1:name}">
            </div>"""

    'Bootstrap Textarea':
        'prefix': 'bsarea'
        'body': """<div class="form-group">
                <label for="${1:name}">${2:title}</label>
                <textarea class="form-control" id="${1:name}" name="${1:name}"></textarea>
            </div>"""

    'Bootstrap Submit Button':
        'prefix': 'bsbutton'
        'body': '<button type="submit" class="btn btn-default">${1:Submit}</button>'