Skip to content

Instantly share code, notes, and snippets.

@DerZyklop DerZyklop/init.coffee
Last active Oct 16, 2019

Embed
What would you like to do?
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
# console.log "Saved! #{editor.getPath()}"
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an example taken from Atom's built-in keymap:
#
# 'atom-text-editor':
# 'enter': 'editor:newline'
#
# 'atom-workspace':
# 'ctrl-shift-p': 'core:move-up'
# 'ctrl-p': 'core:move-down'
#
# You can find more information about keymaps in these guides:
# * http://flight-manual.atom.io/using-atom/sections/basic-customization/#_customizing_keybindings
# * http://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/
#
# If you're having trouble with your keybindings not working, try the
# Keybinding Resolver: `Cmd+.` on macOS and `Ctrl+.` on other platforms. See the
# Debugging Guide for more information:
# * http://flight-manual.atom.io/hacking-atom/sections/debugging/#check-the-keybindings
#
# 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
'body':
'ctrl-tab': 'pane:show-next-item'
'ctrl-tab ^ctrl': 'unset!'
'ctrl-shift-tab': 'pane:show-previous-item'
'ctrl-shift-tab ^ctrl': 'unset!'
[
{
"name": "about",
"version": "1.9.1"
},
{
"name": "angular-2-typeScript-snippets",
"version": "0.7.0"
},
{
"name": "angular2-component-generator",
"version": "0.0.1"
},
{
"name": "archive-view",
"version": "0.65.1"
},
{
"name": "ariake-dark-syntax",
"version": "0.2.1",
"theme": "syntax"
},
{
"name": "atom-dark-syntax",
"version": "0.29.1",
"theme": "syntax"
},
{
"name": "atom-dark-ui",
"version": "0.53.3",
"theme": "ui"
},
{
"name": "atom-ide-debugger-node",
"version": "0.7.3"
},
{
"name": "atom-ide-ui",
"version": "0.13.0"
},
{
"name": "atom-ignore",
"version": "0.2.0"
},
{
"name": "atom-light-syntax",
"version": "0.29.1",
"theme": "syntax"
},
{
"name": "atom-light-ui",
"version": "0.46.3",
"theme": "ui"
},
{
"name": "atom-monokai",
"version": "0.10.9",
"theme": "syntax"
},
{
"name": "atom-perforce",
"version": "1.7.11"
},
{
"name": "atom-typescript",
"version": "13.3.0"
},
{
"name": "auto-update-packages",
"version": "1.0.1"
},
{
"name": "autocomplete-atom-api",
"version": "0.10.7"
},
{
"name": "autocomplete-css",
"version": "0.17.5"
},
{
"name": "autocomplete-html",
"version": "0.8.8"
},
{
"name": "autocomplete-paths",
"version": "2.12.2"
},
{
"name": "autocomplete-plus",
"version": "2.42.3"
},
{
"name": "autocomplete-snippets",
"version": "1.12.1"
},
{
"name": "autocomplete-xml",
"version": "0.11.0"
},
{
"name": "autoflow",
"version": "0.29.4"
},
{
"name": "autosave",
"version": "0.24.6"
},
{
"name": "background-tips",
"version": "0.28.0"
},
{
"name": "base16-tomorrow-dark-theme",
"version": "1.6.0",
"theme": "syntax"
},
{
"name": "base16-tomorrow-light-theme",
"version": "1.6.0",
"theme": "syntax"
},
{
"name": "bookmarks",
"version": "0.46.0"
},
{
"name": "bracket-matcher",
"version": "0.91.1"
},
{
"name": "busy-signal",
"version": "2.0.1"
},
{
"name": "cake-syntax",
"version": "1.0.2",
"theme": "syntax"
},
{
"name": "command-palette",
"version": "0.43.5"
},
{
"name": "custom-title",
"version": "1.0.1"
},
{
"name": "dalek",
"version": "0.2.2"
},
{
"name": "deprecation-cop",
"version": "0.56.9"
},
{
"name": "dev-live-reload",
"version": "0.48.1"
},
{
"name": "docblockr",
"version": "0.13.7"
},
{
"name": "editorconfig",
"version": "2.5.0"
},
{
"name": "emmet",
"version": "2.4.3"
},
{
"name": "encoding-selector",
"version": "0.23.9"
},
{
"name": "exception-reporting",
"version": "0.43.1"
},
{
"name": "file-icons",
"version": "2.1.35"
},
{
"name": "find-and-replace",
"version": "0.219.0"
},
{
"name": "firewatch-dark-syntax",
"version": "1.1.7",
"theme": "syntax"
},
{
"name": "firewatch-green-syntax",
"version": "1.1.0",
"theme": "syntax"
},
{
"name": "firewatch-hot-syntax",
"version": "1.4.1",
"theme": "syntax"
},
{
"name": "firewatch-syntax",
"version": "1.1.1",
"theme": "syntax"
},
{
"name": "fold-imports",
"version": "0.9.0"
},
{
"name": "fuzzy-finder",
"version": "1.14.0"
},
{
"name": "git-diff",
"version": "1.3.9"
},
{
"name": "github",
"version": "0.30.0"
},
{
"name": "go-to-line",
"version": "0.33.0"
},
{
"name": "grammar-selector",
"version": "0.50.1"
},
{
"name": "ide-css",
"version": "0.3.3"
},
{
"name": "ide-html",
"version": "0.6.0"
},
{
"name": "ide-json",
"version": "0.2.1"
},
{
"name": "ide-typescript",
"version": "0.9.1"
},
{
"name": "image-view",
"version": "0.64.0"
},
{
"name": "incompatible-packages",
"version": "0.27.3"
},
{
"name": "intentions",
"version": "1.1.5"
},
{
"name": "keybinding-resolver",
"version": "0.39.0"
},
{
"name": "language-c",
"version": "0.60.18"
},
{
"name": "language-clojure",
"version": "0.22.8"
},
{
"name": "language-coffee-script",
"version": "0.50.0"
},
{
"name": "language-csharp",
"version": "1.1.0"
},
{
"name": "language-css",
"version": "0.44.0"
},
{
"name": "language-freemarker",
"version": "0.2.0"
},
{
"name": "language-gfm",
"version": "0.90.6"
},
{
"name": "language-git",
"version": "0.19.1"
},
{
"name": "language-go",
"version": "0.47.1"
},
{
"name": "language-html",
"version": "0.52.3"
},
{
"name": "language-html-angular",
"version": "1.0.16"
},
{
"name": "language-hyperlink",
"version": "0.17.1"
},
{
"name": "language-java",
"version": "0.31.3"
},
{
"name": "language-javascript",
"version": "0.132.0"
},
{
"name": "language-json",
"version": "1.0.4"
},
{
"name": "language-less",
"version": "0.34.3"
},
{
"name": "language-make",
"version": "0.23.0"
},
{
"name": "language-mustache",
"version": "0.14.5"
},
{
"name": "language-objective-c",
"version": "0.16.0"
},
{
"name": "language-perl",
"version": "0.38.1"
},
{
"name": "language-php",
"version": "0.44.2"
},
{
"name": "language-property-list",
"version": "0.9.1"
},
{
"name": "language-python",
"version": "0.53.3"
},
{
"name": "language-ruby",
"version": "0.72.17"
},
{
"name": "language-ruby-on-rails",
"version": "0.25.3"
},
{
"name": "language-rust-bundled",
"version": "0.1.0"
},
{
"name": "language-sass",
"version": "0.62.0"
},
{
"name": "language-shellscript",
"version": "0.27.12"
},
{
"name": "language-source",
"version": "0.9.0"
},
{
"name": "language-sql",
"version": "0.25.10"
},
{
"name": "language-text",
"version": "0.7.4"
},
{
"name": "language-todo",
"version": "0.29.4"
},
{
"name": "language-toml",
"version": "0.20.0"
},
{
"name": "language-typescript",
"version": "0.5.2"
},
{
"name": "language-typescript-react",
"version": "0.1.1"
},
{
"name": "language-xml",
"version": "0.35.3"
},
{
"name": "language-yaml",
"version": "0.32.0"
},
{
"name": "line-ending-selector",
"version": "0.7.7"
},
{
"name": "link",
"version": "0.31.6"
},
{
"name": "linter",
"version": "2.3.1"
},
{
"name": "linter-eslint",
"version": "8.5.5"
},
{
"name": "linter-htmllint",
"version": "1.1.5"
},
{
"name": "linter-json-lint",
"version": "0.1.3"
},
{
"name": "linter-scss-lint",
"version": "3.2.1"
},
{
"name": "linter-stylelint",
"version": "4.4.9"
},
{
"name": "linter-tslint",
"version": "1.10.31"
},
{
"name": "linter-ui-default",
"version": "1.8.0"
},
{
"name": "markdown-preview",
"version": "0.160.2"
},
{
"name": "markdown-preview-plus",
"version": "3.11.0"
},
{
"name": "metrics",
"version": "1.8.1"
},
{
"name": "monokai",
"version": "0.24.0",
"theme": "syntax"
},
{
"name": "notifications",
"version": "0.70.6"
},
{
"name": "one-dark-syntax",
"version": "1.8.4",
"theme": "syntax"
},
{
"name": "one-dark-ui",
"version": "1.12.5",
"theme": "ui"
},
{
"name": "one-light-syntax",
"version": "1.8.4",
"theme": "syntax"
},
{
"name": "one-light-ui",
"version": "1.12.5",
"theme": "ui"
},
{
"name": "open-on-github",
"version": "1.3.1"
},
{
"name": "package-generator",
"version": "1.3.0"
},
{
"name": "php-integrator-autocomplete-plus",
"version": "1.6.2"
},
{
"name": "plano-syntax",
"version": "1.1.1",
"theme": "syntax",
"apmInstallSource": {
"type": "git",
"source": "DerZyklop/plano-syntax",
"sha": "7c51b3755fb10a4a0b92329699c0bdea03de5d4c"
}
},
{
"name": "prettier-atom",
"version": "0.57.3"
},
{
"name": "save-workspace",
"version": "0.5.0"
},
{
"name": "settings-view",
"version": "0.261.3"
},
{
"name": "snippets",
"version": "1.5.0"
},
{
"name": "solarized-dark-syntax",
"version": "1.3.0",
"theme": "syntax"
},
{
"name": "solarized-light-syntax",
"version": "1.3.0",
"theme": "syntax"
},
{
"name": "spell-check",
"version": "0.75.0"
},
{
"name": "status-bar",
"version": "1.8.17"
},
{
"name": "styleguide",
"version": "0.49.12"
},
{
"name": "symbols-tree-view",
"version": "0.14.0"
},
{
"name": "symbols-view",
"version": "0.118.2"
},
{
"name": "sync-settings",
"version": "0.8.6"
},
{
"name": "tabs",
"version": "0.110.0"
},
{
"name": "timecop",
"version": "0.36.2"
},
{
"name": "todo",
"version": "0.6.0"
},
{
"name": "todo-show",
"version": "2.3.2"
},
{
"name": "tree-view",
"version": "0.228.0"
},
{
"name": "update-package-dependencies",
"version": "0.13.1"
},
{
"name": "welcome",
"version": "0.36.9"
},
{
"name": "whitespace",
"version": "0.37.7"
},
{
"name": "wrap-guide",
"version": "0.41.0"
}
]
{
"atom-ide-ui": {
"atom-ide-diagnostics-ui": {
"autoVisibility": true,
"statusBarPosition": "right"
},
"use": {}
},
"atom-ignore": {
"enabled": false
},
"atom-perforce": {
"autoAdd": true,
"autoEdit": true,
"autoRevert": true
},
"atom-typescript": {
"tooltipDelay": 700
},
"auto-update-packages": {
"intervalMinutes": 60
},
"core": {
"customFileTypes": {
"source.tsx": [
"ts"
]
},
"disabledPackages": [
"markdown-preview",
"linter-eslint",
"linter",
"docblockr",
"prettier-atom",
"language-typescript-react",
"editorconfig",
"ide-typescript"
],
"ignoredNames": [
".git",
"node_modules",
"documentation",
"dist"
],
"telemetryConsent": "no",
"themes": [
"one-dark-ui",
"plano-syntax"
],
"useTreeSitterParsers": false
},
"custom-title": {
"template": "<% if (fileInProject) { %><%= relativeFilePath %> | <%= projectName %><% } else { %><%= filePath %><% } %>"
},
"docblockr": {
"align_tags": "shallow",
"auto_add_method_tag": true
},
"editor": {
"fontFamily": "Fira Code, Operator Mono, Fira Code",
"fontSize": 15,
"invisibles": {
"eol": " "
},
"preferredLineLength": 120,
"scrollPastEnd": true,
"showIndentGuide": true,
"showInvisibles": true,
"softWrap": true,
"softWrapAtPreferredLineLength": true
},
"emmet": {
"extensionsPath": "~/.atom/emmet"
},
"exception-reporting": {
"userId": "169d9ee9-5a7f-47f0-88f0-40bf8276f381"
},
"ide-css": {
"lessSupport": false
},
"ide-typescript": {},
"linter-htmllint": {
"enabledScopes": [
"text.html.angular",
"text.html.basic",
"text.html.gohtml",
"text.html.jsp",
"text.html.mustache",
"text.html.ng"
]
},
"linter-json-lint": {
"allowComments": true
},
"linter-scss-lint": {
"disableWhenNoConfigFileInPath": true
},
"linter-tslint": {
"fixOnSave": true,
"ignoreTypings": true,
"useGlobalTslint": true
},
"linter-ui-default": {
"panelHeight": 270,
"showPanel": true
},
"minimap": {
"displayCodeHighlights": false
},
"prettier-atom": {
"formatOnSaveOptions": {
"enabled": true,
"isDisabledIfNoConfigFile": true,
"isDisabledIfNotInPackageJson": true
},
"prettierEslintOptions": {
"prettierLast": true
},
"useStylelint": true
},
"save-workspace-Workspaces": {
"Plano": {
"panes": [
{
"tabs": [
"/Users/plano/S/plano/projects/scheduler.frontend.ng2/src/client/time-stamp/time-stamp-api.service.spec.ts",
"/Users/plano/S/plano/projects/scheduler.frontend.ng2/src/client/time-stamp/time-stamp-api.service.ts",
"atom://config",
"atom://find-and-replace/project-results",
"/Users/plano/S/plano/projects/scheduler.frontend.ng2/src/client/time-stamp/stopwatch/stopwatch.component.html"
]
}
],
"projectPaths": [
"/Users/plano/S/plano/projects/scheduler.frontend.ng2",
"/Users/plano/S/plano/projects/scheduler.frontend.ng2/node_modules/bootstrap/scss",
"/Users/plano/S/plano/projects/scheduler.access/api/implementation_meta"
]
}
},
"sync-settings": {
"quietUpdateCheck": true,
"removeObsoletePackages": true
},
"todo": {
"a_pattern": "TODO\\:.+|FIXME\\:.+|CHANGED\\:.+|XXX\\:.+|IDEA\\:.+|HACK\\:.+|REVIEW\\:.+|NB\\:.+|BUG\\:.+|QUESTION\\:.+|COMBAK\\:.+|TEMP\\:.+|DEBUG\\:.+|OPTIMIZE\\:.+|WARNING\\:.+"
},
"todo-show": {
"findTheseTodos": [
"TODO",
"FIXME",
"CHANGED",
"XXX",
"IDEA",
"HACK",
"REVIEW",
"NB",
"BUG",
"QUESTION",
"COMBAK",
"TEMP"
],
"showInTable": [
"Line",
"Type",
"Text",
"Path"
],
"sortBy": "File",
"statusBarIndicator": true
},
"tree-view": {
"hideVcsIgnoredFiles": true
},
"typewriter": {
"scopes": "text.md,source.gfm,text.html.mediawiki,text.tex.latex,source.ts",
"showGutter": true
},
"welcome": {
"showOnStartup": false
}
}
# 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
'.source.sass, .source.scss':
'scss-lint disable':
'prefix': 'scss-disable'
'body': """// scss-lint:disable ${1:Comment}"""
'@media':
'prefix': 'media'
'body': """@media (max-width: 375px) {
$1
}"""
'// scss-lint:disable ImportantRule':
'prefix': 'important'
'body': """// scss-lint:disable ImportantRule"""
'.text.html':
'popover':
'prefix': 'popover'
'body': """
[popover]="'$1'"
triggers="${2:mouseenter:mouseleave}"
container="body"
placement="top"
"""
'TODO':
'prefix': 'todo'
'body': """<!-- TODO: $1 -->"""
'p-alert':
'prefix': 'p-alert'
'body': """
<p-alert${1:
alertType="danger"
[dismissable]="false"
(onClick)="doSomething()"
}>${2:Lorem Ipsum}</p-alert>
"""
'[style]':
'prefix': 'style'
'body': """[style.${1:opacity}]=\"$2\""""
'p-dropdown':
'prefix': 'p-dropdown'
'body': """
<p-dropdown
icon="${1:plus}"
label="${2}"
[(ngModel)]="${10}"
[disabled]="${20:!api.isLoaded()}"
[size]="${30:config.IS_MOBILE ? 'lg' : 'sm'}"
${40:[isMultiSelect]="true"}
>
p-dropdown-item${50}
</p-dropdown>
"""
'p-dropdown-item':
'prefix': 'p-dropdown-item'
'body': """
<p-dropdown-item
label="${10:Kursdatum}"
[value]="${20:fooEnum.BAR}"
[active]="${30:false}"
></p-dropdown-item>
"""
'p-radios':
'prefix': 'p-radios'
'body': """
<p-radios
${1:[editable]="${2:true}"
[api]="api"
(onDismiss)="${4:initFormGroup()}"
[active]="${5:!formItem.isNewItem()}"}
${6:[(ngModel)]="${7}"}
${8:[formControl]="${9}"}
>
<p-radios-radio
${10:label="Ja"}
${11:[value]="true"}
></p-radios-radio>
</p-radios>
"""
'p-modal-content':
'prefix': 'p-modal-content'
'body': """<p-modal-content
modalTitle="Sicher?"
theme="danger"
closeBtnLabel="Ja, löschen"
(onDismiss)="d('Cross click')"
(onClose)="c('Started');"
>
<p-modal-content-body>
<p class="m-0">Bist du sicher?</p>
</p-modal-content-body>
</p-modal-content>"""
'p-form-section':
'prefix': 'p-form-section'
'body': """<p-form-section${1: label=\"$2\"}>
$3
</p-form-section>"""
'p-spinner':
'prefix': 'p-spinner'
'body': """<p-spinner class="p-3"></p-spinner>"""
'log':
'prefix': 'log'
'body': """
<p-todo>{{${1:${2:foo} ? 'true' : 'false'}}}</p-todo>
"""
'p-todo':
'prefix': 'p-todo'
'body': """
<p-todo>$1</p-todo>
"""
'validation-hint':
'prefix': 'validation-hint'
'body': """
<p-validation-hint
${1:[control]="formGroup.controls['${2:firstName}']"}
text="${4:Der angegebene Start muss vor dem angegebenen Ende liegen}"
validationName="${6:...}"
[checkTouched]="${8:false}"
${9:[isInvalid]="${10:true}"}
></p-validation-hint>
"""
'(click)="..."':
'prefix': 'click'
'body': '(click)="${1:...}"'
'p-editable-box':
'prefix': 'p-editable-box'
'body': """
<p-editable-box
${1:[editable]="${2:true}"
[api]="api"
[valid]="${3:!formGroup.invalid}"
(onDismiss)="${4:initFormGroup()}"
[active]="${5:!formItem.isNewItem()}"}
(onRemoveItemClick)="${6:initFormGroup()}"
[disabled]="${7:foo}"
>
<p-editable-box-header${9: label="${10:Label}"}>${11:Label}</p-editable-box-header>
<p-editable-box-showroom>
${12:Showroom}
</p-editable-box-showroom>
<p-editable-box-form>
${13:Form}
</p-editable-box-form>
</p-editable-box>
"""
'p-editable-modal-box':
'prefix': 'p-editable-modal-box'
'body': """
<p-editable-modal-box
${1:[editable]="${2:true}"
[api]="api"
[valid]="${3:!formGroup.invalid}"
(onDismiss)="${4:initFormGroup()}"
[active]="${5:!formItem.isNewItem()}"}
${6:(onRemoveItemClick)="initFormGroup()"}
${7:[saveButtonPopover]="popover"}
[disabled]="${70:foo}"
${90:label="${100:Label}"}
>
<p-editable-modal-box-header></p-editable-modal-box-header>
<p-editable-modal-box-showroom>
${12:Showroom}
</p-editable-modal-box-showroom>
<p-editable-modal-box-form>
${13:Form}
</p-editable-modal-box-form>
</p-editable-modal-box>
"""
'p-list':
'prefix': 'p-list'
'body': """
<p-list>
<p-list-item ${1:size="frameless"}>
<div class="d-flex align-items-center flex-grow-1">
$2
</div>
</p-list-item>
</p-list>
"""
'p-list-item':
'prefix': 'p-list-item'
'body': """
<p-list-item ${1:size="frameless"}>
<div class="d-flex align-items-center flex-grow-1">
$2
</div>
</p-list-item>
"""
'placeholder':
'prefix': 'placeholder'
'body': 'placeholder="${1:...}"'
'fa-icon':
'prefix': 'fa'
'body': '<fa-icon [fixedWidth]="true" icon="${1:pen}"></fa-icon>'
'[ngif]="..."':
'prefix': 'ngif[]'
'body': '[ngIf]="${1:expression}"'
'[ngIfElse]="..."':
'prefix': 'ngIfElse[]'
'body': '[ngIfElse]="${1:expression}"'
'[ngForOf]="..."':
'prefix': 'ngFor[]'
'body': """
ngFor let-${1:item}
[ngForOf]="${2:items}.iterable()"
"""
'*ngif="..."':
'prefix': 'ngif*'
'body': '*ngIf="${1:expression}"'
'*ngif="..." ':
'prefix': 'if'
'body': '*ngIf="${1:expression}"'
'<ng-template [ngif]="...">':
'prefix': 'ifTemplate'
'body': """
<ng-template [ngIf]="${1:expression}">
${2}
</ng-template>
"""
'<ng-template [ngif]="..." [ngIfElse]="...">':
'prefix': 'ifElse'
'body': """
<ng-template [ngIf]="${2:expression}" [ngIfElse]="${3:templateId}">
${4}
</ng-template>
<ng-template #${3:templateId}>
${5}
</ng-template>
"""
'<ng-template>':
'prefix': 'ng-template'
'body': """
<ng-template $1>
$2
</ng-template>
"""
'<ng-container *ngTemplateOutlet="idOfOutlet" [ngTemplateOutletContext]="...':
'prefix': 'ng-outlet extended'
'body': """<ng-template
[ngTemplateOutlet]="${1:nameOfTemplate}"
${2:[ngTemplateOutletContext]="${3:object mit '$implicit'}"}
></ng-template>"""
'<ng-container *ngTemplateOutlet="idOfOutlet">...':
'prefix': 'ng-outlet short'
'body': """<ng-template [ngTemplateOutlet]="${1:nameOfTemplate}"></ng-template>"""
'button':
'prefix': 'button'
'body': """
<button class="btn btn-${1:secondary}"
${2:${3:foo}="${4:foo}"}
>${5:Hallo Welt}</button>"""
'p-checkbox':
'prefix': 'p-checkbox'
'body': """
<p-checkbox
${1:[editable]="${2:true}"
[api]="api"
[valid]="${3:!formGroup.invalid}"
(onDismiss)="${4:initFormGroup()}"
[active]="${5:!formItem.isNewItem()}"}
[(ngModel)]="${6:foo}"
[(formControl)]="formGroup.controls['${6:foo}']"
[disabled]="${8:formGroup.invalid}"
>${5:Hallo Welt}</p-checkbox>
"""
'p-radio':
'prefix': 'p-radio'
'body': """
<p-radio
${1:[editable]="${2:true}"
[api]="api"
[valid]="${3:!formGroup.invalid}"
(onDismiss)="${4:initFormGroup()}"
[active]="${5:!formItem.isNewItem()}"}
(checkedChange)="${6:foo}=$event"
[checked]="${6:foo}===true"
[card]="${7:true}"
[disabled]="${8:formGroup.invalid}"
>${5:Hallo Welt}</p-radio>
"""
'p-textarea':
'prefix': 'p-textarea'
'body': """
<p-textarea
${1:[editable]="${2:true}"
[api]="api"
(onDismiss)="${4:initFormGroup()}"
[active]="${5:!formItem.isNewItem()}"}
${6:[(ngModel)]="${7}"}
${8:[(formControl)]="${9}"}
></p-textarea>
"""
'p-input':
'prefix': 'p-input'
'body': """
<p-input
${1:[editable]="${2:true}"
[api]="api"
(onDismiss)="${4:initFormGroup()}"
[active]="${5:!formItem.isNewItem()}"}
${6:[(ngModel)]="${7}"}
${8:[(formControl)]="${9}"}
></p-input>
"""
'p-button':
'prefix': 'p-button'
'body': """
<p-button
${1:[editable]="${2:true}"
[api]="api"
(onDismiss)="${4:initFormGroup()}"
[active]="${5:!formItem.isNewItem()}"}
${6:(triggerClick)="${7}"}
>${8:...}</p-button>
"""
'label':
'prefix': 'label'
'body': "<label>$1</label>"
'p-form-group':
'prefix': 'p-form-group'
'body': """
<p-form-group
label="$1"
[control]="$2"
>$3</p-form-group>
"""
'p-tabs':
'prefix': 'p-tabs'
'body': """
<p-tabs>
<p-tab
label="$10"
${15:[hasDanger]=""}
${16:[active]=""}
>
$20
</p-tab>
</p-tabs>
"""
'p-tab':
'prefix': 'p-tab'
'body': """
<p-tab
label="$10"
${15:[hasDanger]=""}
${16:[active]=""}
>
$20
</p-tab>
"""
'.source.js':
'log':
'prefix': 'log'
'body': 'console.warn($1);'
'.source.tsx, .source.ts':
'// TODO:':
'prefix': 'TODO'
'body': """// TODO: $1"""
'// FIXME:':
'prefix': 'fixme'
'body': """// FIXME: $1"""
'// CHANGED:':
'prefix': 'changed'
'body': """// CHANGED: $1"""
'// XXX:':
'prefix': 'xxx'
'body': """// XXX: $1"""
'// IDEA:':
'prefix': 'idea'
'body': """// IDEA: $1"""
'// HACK:':
'prefix': 'hack'
'body': """// HACK: $1"""
'// NOTE:':
'prefix': 'note'
'body': """// NOTE: $1"""
'// REVIEW:':
'prefix': 'review'
'body': """// REVIEW: $1"""
'// NB:':
'prefix': 'nb'
'body': """// NB: $1"""
'// BUG:':
'prefix': 'bug'
'body': """// BUG: $1"""
'// QUESTION:':
'prefix': 'question'
'body': """// QUESTION: $1"""
'// COMBAK:':
'prefix': 'combak'
'body': """// COMBAK: $1"""
'// TEMP:':
'prefix': 'temp'
'body': """// TEMP: $1"""
'// DEBUG:':
'prefix': 'debug'
'body': """// DEBUG: $1"""
'// OPTIMIZE:':
'prefix': 'optimize'
'body': """// OPTIMIZE: $1"""
'// WARNING:':
'prefix': 'warning'
'body': """// WARNING: $1"""
'// TODO: Obsolete?':
'prefix': 'obsolete'
'body': """// TODO: Obsolete?"""
'PFooBar.component.spec.ts content':
'prefix': 'test'
'body': """
import { TestingUtils } from '@plano/shared/testing/testing-utils';
import { ShiftExchangeDetailFormComponent } from './shift-exchange-detail-form.component';
describe('${1:PFooBar}Component', () => {
let component : ${1:PFooBar}Component;
const testingUtils = new TestingUtils();
testingUtils.init({ imports : [${1:PFooBar}Module] });
beforeAll(() => {
component = testingUtils.createComponent(${1:PFooBar}Component);
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
"""
'this.now = new Date().valueOf();':
'prefix': 'now'
'body': """this.now = new Date().valueOf();"""
'public config : typeof Config = Config':
'prefix': 'config'
'body': """public config : typeof Config = Config;"""
'ngOnDestroy':
'prefix': 'ngOnDestroy'
'body': """
/** ngOnDestroy */
public ngOnDestroy() : void {
$1
}
"""
'ngOnInit':
'prefix': 'ngOnInit'
'body': """
/** ngOnInit */
public ngOnInit() : void {
$1
}
"""
'ngAfterContentInit':
'prefix': 'ngAfterContentInit'
'body': """
/** ngAfterContentInit */
public ngAfterContentInit() : void {
$1
}
"""
'ngAfterContentChecked':
'prefix': 'ngAfterContentChecked'
'body': """
/** ngAfterContentChecked */
public ngAfterContentChecked() : void {
$1
}
"""
'initFormGroup':
'prefix': 'initFormGroup'
'body': """
/**
* Initialice the formGroup for this component
*/
public initFormGroup() : void {
if (this.formGroup) { this.formGroup = undefined; }
const newFormGroup = this.fb.group({});
this.pForms.addControl(newFormGroup, '$1',
{
value: $2,
disabled: false
}
);
this.formGroup = newFormGroup;
}
"""
'bind outer class to component tag':
'prefix': 'class-binding'
'body': """
@HostBinding('class') private classList : string = '';
@Input() private class : string;
public ngOnInit() : void { // tslint:disable-line:completed-docs
if (this.class) this.classList += ` ${this.class}`;
}
"""
'unload()':
'prefix': 'unload'
'body': """
public unload() : void {
this.${1:someProperty} = undefined;
}
"""
'initValues()':
'prefix': 'initValues'
'body': """
/**
* Set some default values for properties that are not defined yet
*/
public initValues() : void {
if (this.${1:someProperty} === undefined) this.${1:someProperty} = ${2:true};
}
"""
'readCookies()':
'prefix': 'readCookies'
'body': """
public readCookies() : void {
if (this.pCookieService.has('${1:someProperty}')) {
this.${1:someProperty} = this.pCookieService.get('${1:someProperty}')${2: === 'true'};
}
}
"""
'service':
'prefix': 'service'
'body': """
import { Injectable } from '@angular/core';
import { PServiceInterface } from '@plano/shared/core/p-service.interface';
@Injectable()
export class P${1:Foo}Service implements PServiceInterface {
private ${2:foo} : boolean;
constructor() {
}
public get${1:Foo}(input : any) : any {
return this.${2:foo};
}
public unload() : void {
this.${2:foo} = false;
}
}
"""
'public config ...;':
'prefix': 'config'
'body': """${1:public }config : typeof Config = Config;"""
'@Input()':
'prefix': 'input'
'body': """@Input() ${1:public }${2:showDayComment} : ${3:boolean}${4: = false};"""
'@Output()':
'prefix': 'output'
'body': """@Output() ${1:public }${2:showDayComment} : EventEmitter<${3:boolean}>${4: = new EventEmitter<${3:boolean}>()};"""
'if (...) return;':
'prefix': 'if-return'
'body': """if (${1:!this.api.isLoaded()}) return${2: false};"""
'todo for milad: remove line above':
'prefix': 'todo-milad'
'body': """// TODO: Milad: Remove line above and fix lint errors"""
'tslint disable':
'prefix': 'tslint-disable'
'body': """/* tslint:disable:${1:no-any}${2: typedef} */"""
'tslint disable-line':
'prefix': 'tslint-disable-line'
'body': """// tslint:disable-line:${1:no-any}${2: typedef}"""
'tslint disable-next-line':
'prefix': 'tslint-disable-next-line'
'body': """// tslint:disable-next-line:${1:no-any}${2: typedef}"""
'if(!foo) return;':
'prefix': 'early-exit'
'body': """if(!${1:foo}) return;"""
'HostBinding':
'prefix': 'HostBinding'
'body': """
@HostBinding('$1')
"""
'@HostBinding() get foo() {}':
'prefix': 'HostBinding()'
'body': """
@HostBinding('$1') private get ${3:hasFoo}() : boolean {
return true;
}
"""
# '.flex-grow-1':
# 'prefix': 'flex-grow-1'
# 'body': """@HostBinding('class.flex-grow-1') private _classFlexGrow1 = true; // tslint:disable-line:typedef"""
# '.flex-row':
# 'prefix': 'flex-row'
# 'body': """@HostBinding('class.flex-row') private _classFlexRow = true; // tslint:disable-line:typedef"""
# '.title':
# 'prefix': 'title'
# 'body': """@HostBinding('class.title') private _classTitle = true; // tslint:disable-line:typedef"""
# '.o-hidden':
# 'prefix': 'o-hidden'
# 'body': """@HostBinding('class.o-hidden') private _classOHidden = true; // tslint:disable-line:typedef"""
# '.d-flex':
# 'prefix': 'd-flex'
# 'body': """@HostBinding('class.d-flex') private _classDFlex = true; // tslint:disable-line:typedef"""
# '.d-none':
# 'prefix': 'd-none'
# 'body': """@HostBinding('class.d-none') private _classDNone = true; // tslint:disable-line:typedef"""
# '.d-block':
# 'prefix': 'd-block'
# 'body': """@HostBinding('class.d-block') private _classDBlock = true; // tslint:disable-line:typedef"""
# '.d-lg-block':
# 'prefix': 'd-lg-block'
# 'body': """@HostBinding('class.d-lg-block') private _classDLgBlock = true; // tslint:disable-line:typedef"""
# '.d-inline':
# 'prefix': 'd-inline'
# 'body': """@HostBinding('class.d-inline') private _classDInline = true; // tslint:disable-line:typedef"""
# '.card-body':
# 'prefix': 'card-body'
# 'body': """@HostBinding('class.card-body') private _classCardBody = true; // tslint:disable-line:typedef"""
# '.position-relative':
# 'prefix': 'position-relative'
# 'body': """// tslint:disable-next-line:typedef
# @HostBinding('class.position-relative') private _classPositionRelative = true;"""
# '.flex-column':
# 'prefix': 'flex-column'
# 'body': """@HostBinding('class.flex-column') private _classFlexColumn = true; // tslint:disable-line:typedef"""
# '.h-100':
# 'prefix': 'h-100'
# 'body': """@HostBinding('class.h-100') private _classH100 = true; // tslint:disable-line:typedef"""
# '.w-100':
# 'prefix': 'w-100'
# 'body': """@HostBinding('class.w-100') private _classW100 = true; // tslint:disable-line:typedef"""
# '.bg-dark':
# 'prefix': 'bg-dark'
# 'body': """@HostBinding('class.bg-dark') private _classBgDark = true; // tslint:disable-line:typedef"""
# '.border-left':
# 'prefix': 'border-left'
# 'body': """@HostBinding('class.border-left') private _classBorderLeft = true; // tslint:disable-line:typedef"""
# '.border-right':
# 'prefix': 'border-right'
# 'body': """@HostBinding('class.border-right') private _classBorderRight = true; // tslint:disable-line:typedef"""
# '.border-bottom':
# 'prefix': 'border-bottom'
# 'body': """@HostBinding('class.border-bottom') private _classBorderBottom = true; // tslint:disable-line:typedef"""
# '.p-0':
# 'prefix': 'p-0'
# 'body': """@HostBinding('class.p-0') private _classP0 = true; // tslint:disable-line:typedef"""
# '.p-1':
# 'prefix': 'p-1'
# 'body': """@HostBinding('class.p-1') private _classP1 = true; // tslint:disable-line:typedef"""
# '.p-2':
# 'prefix': 'p-2'
# 'body': """@HostBinding('class.p-2') private _classP2 = true; // tslint:disable-line:typedef"""
# '.p-3':
# 'prefix': 'p-3'
# 'body': """@HostBinding('class.p-3') private _classP3 = true; // tslint:disable-line:typedef"""
# '.p-4':
# 'prefix': 'p-4'
# 'body': """@HostBinding('class.p-4') private _classP4 = true; // tslint:disable-line:typedef"""
# '.p-5':
# 'prefix': 'p-5'
# 'body': """@HostBinding('class.p-5') private _classP5 = true; // tslint:disable-line:typedef"""
#
# '.pt-1':
# 'prefix': 'pt-1'
# 'body': """@HostBinding('class.pt-1') private _classPT1 = true; // tslint:disable-line:typedef"""
# '.pt-2':
# 'prefix': 'pt-2'
# 'body': """@HostBinding('class.pt-2') private _classPT2 = true; // tslint:disable-line:typedef"""
# '.pt-3':
# 'prefix': 'pt-3'
# 'body': """@HostBinding('class.pt-3') private _classPT3 = true; // tslint:disable-line:typedef"""
# '.pt-4':
# 'prefix': 'pt-4'
# 'body': """@HostBinding('class.pt-4') private _classPT4 = true; // tslint:disable-line:typedef"""
# '.pt-5':
# 'prefix': 'pt-5'
# 'body': """@HostBinding('class.pt-5') private _classPT5 = true; // tslint:disable-line:typedef"""
#
# '.pb-1':
# 'prefix': 'pb-1'
# 'body': """@HostBinding('class.pb-1') private _classPB1 = true; // tslint:disable-line:typedef"""
# '.pb-2':
# 'prefix': 'pb-2'
# 'body': """@HostBinding('class.pb-2') private _classPB2 = true; // tslint:disable-line:typedef"""
# '.pb-3':
# 'prefix': 'pb-3'
# 'body': """@HostBinding('class.pb-3') private _classPB3 = true; // tslint:disable-line:typedef"""
# '.pb-4':
# 'prefix': 'pb-4'
# 'body': """@HostBinding('class.pb-4') private _classPB4 = true; // tslint:disable-line:typedef"""
# '.pb-5':
# 'prefix': 'pb-5'
# 'body': """@HostBinding('class.pb-5') private _classPB5 = true; // tslint:disable-line:typedef"""
#
# '.align-items-stretch':
# 'prefix': 'align-items-stretch'
# 'body': """@HostBinding('class.align-items-stretch') private _classAlignItemsStretch = true; // tslint:disable-line:typedef"""
# '.align-items-center':
# 'prefix': 'align-items-center'
# 'body': """// tslint:disable-next-line:typedef
# @HostBinding('class.align-items-center') private _classAlignItemsCenter = true; // tslint:disable-line:typedef"""
# '.justify-content-between':
# 'prefix': 'justify-content-between'
# 'body': """// tslint:disable-next-line:typedef
# @HostBinding('class.justify-content-between') private _classJustifyContentBetween = true;"""
# '.justify-content-center':
# 'prefix': 'justify-content-center'
# 'body': """// tslint:disable-next-line:typedef
# @HostBinding('class.justify-content-center') private _classJustifyContentCenter = true;"""
# '.justify-content-stretch':
# 'prefix': 'justify-content-stretch'
# 'body': """// tslint:disable-next-line:typedef
# @HostBinding('class.justify-content-stretch') private _classJustifyContentStretch = true;"""
# '.input-group-prepend':
# 'prefix': 'input-group-prepend'
# 'body': """// tslint:disable-next-line:typedef
# @HostBinding('class.input-group-prepend') private _classInputGroupPrepend = true;"""
# '.input-group-append':
# 'prefix': 'input-group-append'
# 'body': """// tslint:disable-next-line:typedef
# @HostBinding('class.input-group-append') private _classInputGroupAppend = true;"""
'.flex-grow-1':
'prefix': 'flex-grow-1'
'body': """@HostBinding('class.flex-grow-1') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.flex-row':
'prefix': 'flex-row'
'body': """@HostBinding('class.flex-row') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.title':
'prefix': 'title'
'body': """@HostBinding('class.title') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.o-hidden':
'prefix': 'o-hidden'
'body': """@HostBinding('class.o-hidden') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.d-flex':
'prefix': 'd-flex'
'body': """@HostBinding('class.d-flex') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.d-none':
'prefix': 'd-none'
'body': """@HostBinding('class.d-none') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.d-block':
'prefix': 'd-block'
'body': """@HostBinding('class.d-block') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.d-lg-block':
'prefix': 'd-lg-block'
'body': """@HostBinding('class.d-lg-block') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.d-inline':
'prefix': 'd-inline'
'body': """@HostBinding('class.d-inline') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.card-body':
'prefix': 'card-body'
'body': """@HostBinding('class.card-body') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.position-relative':
'prefix': 'position-relative'
'body': """// tslint:disable-next-line:typedef
@HostBinding('class.position-relative') private _alwaysTrue = true;"""
'.flex-column':
'prefix': 'flex-column'
'body': """@HostBinding('class.flex-column') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.h-100':
'prefix': 'h-100'
'body': """@HostBinding('class.h-100') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.w-100':
'prefix': 'w-100'
'body': """@HostBinding('class.w-100') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.bg-dark':
'prefix': 'bg-dark'
'body': """@HostBinding('class.bg-dark') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.border-left':
'prefix': 'border-left'
'body': """@HostBinding('class.border-left') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.border-right':
'prefix': 'border-right'
'body': """@HostBinding('class.border-right') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.border-bottom':
'prefix': 'border-bottom'
'body': """@HostBinding('class.border-bottom') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.p-0':
'prefix': 'p-0'
'body': """@HostBinding('class.p-0') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.p-1':
'prefix': 'p-1'
'body': """@HostBinding('class.p-1') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.p-2':
'prefix': 'p-2'
'body': """@HostBinding('class.p-2') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.p-3':
'prefix': 'p-3'
'body': """@HostBinding('class.p-3') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.p-4':
'prefix': 'p-4'
'body': """@HostBinding('class.p-4') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.p-5':
'prefix': 'p-5'
'body': """@HostBinding('class.p-5') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.pt-1':
'prefix': 'pt-1'
'body': """@HostBinding('class.pt-1') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.pt-2':
'prefix': 'pt-2'
'body': """@HostBinding('class.pt-2') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.pt-3':
'prefix': 'pt-3'
'body': """@HostBinding('class.pt-3') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.pt-4':
'prefix': 'pt-4'
'body': """@HostBinding('class.pt-4') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.pt-5':
'prefix': 'pt-5'
'body': """@HostBinding('class.pt-5') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.pb-1':
'prefix': 'pb-1'
'body': """@HostBinding('class.pb-1') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.pb-2':
'prefix': 'pb-2'
'body': """@HostBinding('class.pb-2') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.pb-3':
'prefix': 'pb-3'
'body': """@HostBinding('class.pb-3') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.pb-4':
'prefix': 'pb-4'
'body': """@HostBinding('class.pb-4') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.pb-5':
'prefix': 'pb-5'
'body': """@HostBinding('class.pb-5') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.align-items-stretch':
'prefix': 'align-items-stretch'
'body': """@HostBinding('class.align-items-stretch') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.align-items-center':
'prefix': 'align-items-center'
'body': """// tslint:disable-next-line:typedef
@HostBinding('class.align-items-center') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.justify-content-between':
'prefix': 'justify-content-between'
'body': """@HostBinding('class.justify-content-between') private _alwaysTrue = true; // tslint:disable-line:typedef"""
'.justify-content-center':
'prefix': 'justify-content-center'
'body': """// tslint:disable-next-line:typedef
@HostBinding('class.justify-content-center') private _alwaysTrue = true;"""
'.justify-content-stretch':
'prefix': 'justify-content-stretch'
'body': """// tslint:disable-next-line:typedef
@HostBinding('class.justify-content-stretch') private _alwaysTrue = true;"""
'.input-group-prepend':
'prefix': 'input-group-prepend'
'body': """// tslint:disable-next-line:typedef
@HostBinding('class.input-group-prepend') private _alwaysTrue = true;"""
'.input-group-append':
'prefix': 'input-group-append'
'body': """// tslint:disable-next-line:typedef
@HostBinding('class.input-group-append') private _alwaysTrue = true;"""
'onFocus':
'prefix': 'onFocus'
'body': """
@HostListener('focus', ['$event']) private onFocus(event : Event) : void {
$1
}
"""
'onClick':
'prefix': 'onClick'
'body': """
@HostListener('click', ['$event']) private onClick(event : Event) : void {
$1
}
"""
'onEnter':
'prefix': 'onEnter'
'body': """
@HostListener('keyup.enter', ['$event']) private onEnter(event : Event) : void {
$1
}
"""
'forof':
'prefix': 'forof'
'body': """
for (${30:const} ${20:item} of ${2:${1:this.api.data.shifts}.iterable()}) {
${40:doSomething(item)}
}
"""
'///':
'prefix': '///'
'body': """
/**${1: <- use this for dockblockr\n// <- use this for a little note }
"""
'jsdoc':
'prefix': '/**'
'body': """/**\n * $1\n */"""
'log':
'prefix': 'log'
'body': 'console.log(\'$1\');'
'console.warn("TODO: ...")':
'prefix': 'todo'
'body': 'if (Config.DEBUG) console.warn(\'TODO: ${1:Not implemented yet}\');'
'console.warn("IMPROVE: ...")':
'prefix': 'improve'
'body': 'if (Config.DEBUG) console.debug(\'IMPROVE: ${1:Add [${2:hasFoo}]="${3:boolean}" to make this a dump component.}\');'
'console.warn("OPTIMIZE: ..")':
'prefix': 'optimize'
'body': 'if (Config.DEBUG) console.debug(\'IMPROVE: $1\');'
'warn':
'prefix': 'warn'
'body': 'console.warn(\'$1\');'
'debug':
'prefix': 'debug'
'body': 'if (Config.DEBUG) console.debug(\'$1\');'
'beforeEach(() => {})':
'prefix': 'beforeEach'
'body': """
beforeEach(() => {
$3
});
"""
'describe(\'name\', () => {})':
'prefix': 'describe'
'body': """
describe('${1:doSomething()}', () => {
it('${2:should do ...}', () => {
$3
});
});
"""
'it(\'should ...\', () => {})':
'prefix': 'it'
'body': """
it('${1:should do ...}', () => {
$2
});
"""
'switch':
'prefix': 'switch'
'body': """
switch (${1}) {
case ${2} :
${3:doSomething();}
default :
${4:throw 'error'};
}
"""
'switch case':
'prefix': 'case'
'body': """
case ${2} :
${3:doSomething();}
"""
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
/*
* Examples
* (To see them, uncomment and save)
*/
// style the background color of the tree view
.tree-view {
// background-color: whitesmoke;
}
// style the background and foreground colors on the atom-text-editor-element itself
atom-text-editor {
// color: white;
// background-color: hsl(180, 24%, 12%);
}
// style UI elements inside atom-text-editor
atom-text-editor .cursor {
// border-color: red;
}
atom-workspace {
text-rendering: optimizeLegibility;
}
atom-text-editor.editor .syntax--string.syntax--quoted,
atom-text-editor.editor .syntax--string.syntax--regexp {
//-webkit-font-feature-settings: "liga" off, "calt" off;
text-rendering: optimizeLegibility;
}
atom-text-editor {
text-rendering: optimizeLegibility;
}
atom-text-editor.editor .syntax--string.syntax--quoted,
atom-text-editor.editor .syntax--string.syntax--regexp {
-webkit-font-feature-settings: "liga" off, "calt" off;
}
// NOTE: Operator Mono specific styles [START]
atom-text-editor.editor {
.syntax--storage.syntax--type.syntax--function.syntax--arrow,
.syntax--keyword.syntax--operator:not(.accessor),
.syntax--punctuation.syntax--definition {
font-family: "Fira Code";
}
.syntax--string.syntax--quoted,
.syntax--string.syntax--regexp {
-webkit-font-feature-settings: "liga" off, "calt" off;
}
}
atom-text-editor {
text-rendering: optimizeLegibility;
// -webkit-font-smoothing: antialiased;
font-family: "Fira Code";
//font-family: "Operator Mono";
// font-weight: 500;
// line-height: 1.7;
}
atom-text-editor.editor .syntax--comment {
font-family: "Operator Mono";
// font-family: "fantasque sans mono";
}
// NOTE: Operator Mono specific styles [END]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.