Skip to content

Instantly share code, notes, and snippets.

@pauljugarean
Last active August 27, 2018 10:15
Show Gist options
  • Save pauljugarean/8daaef4f8c873a6f3dd257033276c711 to your computer and use it in GitHub Desktop.
Save pauljugarean/8daaef4f8c873a6f3dd257033276c711 to your computer and use it in GitHub Desktop.
# 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.
#
# 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:
# * https://atom.io/docs/latest/using-atom-basic-customization#customizing-key-bindings
# * https://atom.io/docs/latest/behind-atom-keymaps-in-depth
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it here:
# https://github.com/bevry/cson#what-is-cson
'.platform-darwin atom-workspace':
'cmd-alt-v': 'indent-toggle-on-paste:paste'
'cmd-shift-v': 'clipboard-plus:toggle',
'ctrl-alt-p': 'project-manager:list-projects'
'atom-text-editor':
'cmd-l' : 'go-to-line:toggle'
'atom-workspace':
'ctrl-alt-p': 'git-projects:toggle'
'ctrl-alt-i': 'remote-ftp:connect'
'ctrl-alt-u': 'remote-ftp:disconnect'
'cmd-`': 'platformio-ide-terminal:toggle',
'cmd-i': 'tree-view:toggle-ignored-names'
'cmd-shift-space': 'whitespace:convert-tabs-to-spaces'
'cmd-shift-alt-space': 'whitespace:convert-spaces-to-tabs'
'cmd-k cmd-t': 'change-case:title'
'cmd-k cmd-s': 'change-case:sentence'
'cmd-shift-w': 'wrap-in-tag:wrap'
'ctrl-cmd-p': 'svg-preview:toggle'
'atom-text-editor[data-grammar="text html nunjucks"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'
'atom-text-editor[data-grammar="source nunjucks"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'
#https://github.com/atom/autocomplete-plus/issues/86#issuecomment-82661027
'atom-text-editor.autocomplete-active:not([mini])':
'tab': 'autocomplete-plus:confirm'
# Stop emmet from hijacking tab from snippet tab stops
'atom-text-editor[data-grammar="text html basic"]:not([mini]), atom-text-editor[data-grammar="source nunjucks"]:not([mini]), atom-text-editor[data-grammar="text html nunjucks"]:not([mini]), atom-text-editor[data-grammar~="jade"]:not([mini]), atom-text-editor[data-grammar~="css"]:not([mini]), atom-text-editor[data-grammar~="sass"]:not([mini])':
'tab': 'snippets:next-tab-stop'
[
{
"name": "Stylus",
"version": "3.1.1"
},
{
"name": "about",
"version": "1.9.1"
},
{
"name": "archive-view",
"version": "0.65.1"
},
{
"name": "atom-beautify",
"version": "0.32.5"
},
{
"name": "atom-dark-syntax",
"version": "0.29.0",
"theme": "syntax"
},
{
"name": "atom-dark-ui",
"version": "0.53.2",
"theme": "ui"
},
{
"name": "atom-debug-ui",
"version": "1.0.4"
},
{
"name": "atom-handlebars",
"version": "1.3.0"
},
{
"name": "atom-ide-ui",
"version": "0.12.0"
},
{
"name": "atom-light-syntax",
"version": "0.29.0",
"theme": "syntax"
},
{
"name": "atom-light-ui",
"version": "0.46.2",
"theme": "ui"
},
{
"name": "atom-quokka",
"version": "1.0.83"
},
{
"name": "atom-wrap-in-tag",
"version": "0.6.0"
},
{
"name": "autoclose-html",
"version": "0.23.0"
},
{
"name": "autocomplete-atom-api",
"version": "0.10.7"
},
{
"name": "autocomplete-css",
"version": "0.17.5"
},
{
"name": "autocomplete-html",
"version": "0.8.4"
},
{
"name": "autocomplete-plus",
"version": "2.40.6"
},
{
"name": "autocomplete-snippets",
"version": "1.12.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.5.0",
"theme": "syntax"
},
{
"name": "base16-tomorrow-light-theme",
"version": "1.5.0",
"theme": "syntax"
},
{
"name": "bookmarks",
"version": "0.45.1"
},
{
"name": "bracket-matcher",
"version": "0.89.2"
},
{
"name": "cold-snack-syntax",
"version": "0.0.4",
"theme": "syntax"
},
{
"name": "cold-snack-ui",
"version": "0.1.12",
"theme": "ui"
},
{
"name": "command-palette",
"version": "0.43.5"
},
{
"name": "dalek",
"version": "0.2.2"
},
{
"name": "deprecation-cop",
"version": "0.56.9"
},
{
"name": "dev-live-reload",
"version": "0.48.1"
},
{
"name": "emmet",
"version": "2.4.3"
},
{
"name": "encoding-selector",
"version": "0.23.9"
},
{
"name": "exception-reporting",
"version": "0.43.1"
},
{
"name": "find-and-replace",
"version": "0.215.12"
},
{
"name": "fuzzy-finder",
"version": "1.8.2"
},
{
"name": "git-diff",
"version": "1.3.9"
},
{
"name": "github",
"version": "0.17.3"
},
{
"name": "go-to-line",
"version": "0.33.0"
},
{
"name": "grammar-selector",
"version": "0.50.1"
},
{
"name": "highlight-selected",
"version": "0.13.1"
},
{
"name": "ide-php",
"version": "0.7.14"
},
{
"name": "ide-python",
"version": "0.9.2"
},
{
"name": "image-view",
"version": "0.62.4"
},
{
"name": "incompatible-packages",
"version": "0.27.3"
},
{
"name": "keybinding-resolver",
"version": "0.38.1"
},
{
"name": "language-c",
"version": "0.59.10"
},
{
"name": "language-clojure",
"version": "0.22.7"
},
{
"name": "language-coffee-script",
"version": "0.49.3"
},
{
"name": "language-csharp",
"version": "1.0.4"
},
{
"name": "language-css",
"version": "0.42.11"
},
{
"name": "language-gfm",
"version": "0.90.5"
},
{
"name": "language-git",
"version": "0.19.1"
},
{
"name": "language-go",
"version": "0.45.4"
},
{
"name": "language-html",
"version": "0.50.1"
},
{
"name": "language-hyperlink",
"version": "0.16.3"
},
{
"name": "language-java",
"version": "0.30.0"
},
{
"name": "language-javascript",
"version": "0.128.8"
},
{
"name": "language-json",
"version": "0.19.2"
},
{
"name": "language-less",
"version": "0.34.2"
},
{
"name": "language-make",
"version": "0.22.3"
},
{
"name": "language-mustache",
"version": "0.14.5"
},
{
"name": "language-nunjucks",
"version": "4.2.1"
},
{
"name": "language-objective-c",
"version": "0.15.1"
},
{
"name": "language-perl",
"version": "0.38.1"
},
{
"name": "language-php",
"version": "0.44.0"
},
{
"name": "language-property-list",
"version": "0.9.1"
},
{
"name": "language-python",
"version": "0.50.1"
},
{
"name": "language-ruby",
"version": "0.71.4"
},
{
"name": "language-ruby-on-rails",
"version": "0.25.3"
},
{
"name": "language-sass",
"version": "0.62.0"
},
{
"name": "language-shellscript",
"version": "0.26.6"
},
{
"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.18.2"
},
{
"name": "language-typescript",
"version": "0.3.4"
},
{
"name": "language-xml",
"version": "0.35.2"
},
{
"name": "language-yaml",
"version": "0.32.0"
},
{
"name": "line-ending-selector",
"version": "0.7.7"
},
{
"name": "link",
"version": "0.31.4"
},
{
"name": "markdown-preview",
"version": "0.159.20"
},
{
"name": "markdown-writer",
"version": "2.7.4"
},
{
"name": "metrics",
"version": "1.2.8"
},
{
"name": "minimap",
"version": "4.29.8"
},
{
"name": "nms-color-bracket",
"version": "0.1.0"
},
{
"name": "notifications",
"version": "0.70.5"
},
{
"name": "one-dark-syntax",
"version": "1.8.3",
"theme": "syntax"
},
{
"name": "one-dark-ui",
"version": "1.12.3",
"theme": "ui"
},
{
"name": "one-light-syntax",
"version": "1.8.3",
"theme": "syntax"
},
{
"name": "one-light-ui",
"version": "1.12.3",
"theme": "ui"
},
{
"name": "open-on-github",
"version": "1.3.1"
},
{
"name": "package-generator",
"version": "1.3.0"
},
{
"name": "php-debug",
"version": "0.3.5"
},
{
"name": "pigments",
"version": "0.40.2"
},
{
"name": "settings-view",
"version": "0.255.0"
},
{
"name": "snippets",
"version": "1.3.3"
},
{
"name": "solarized-dark-syntax",
"version": "1.1.5",
"theme": "syntax"
},
{
"name": "solarized-light-syntax",
"version": "1.1.5",
"theme": "syntax"
},
{
"name": "spell-check",
"version": "0.73.5"
},
{
"name": "status-bar",
"version": "1.8.15"
},
{
"name": "styleguide",
"version": "0.49.11"
},
{
"name": "symbols-view",
"version": "0.118.2"
},
{
"name": "sync-settings",
"version": "0.8.6"
},
{
"name": "tabs",
"version": "0.109.2"
},
{
"name": "timecop",
"version": "0.36.2"
},
{
"name": "tree-view",
"version": "0.222.0"
},
{
"name": "update-package-dependencies",
"version": "0.13.1"
},
{
"name": "welcome",
"version": "0.36.6"
},
{
"name": "whitespace",
"version": "0.37.6"
},
{
"name": "wrap-guide",
"version": "0.40.3"
}
]
{
"atom-beautify": {
"general": {
"_analyticsUserId": "7b60de66-8f96-4bbd-9b54-def3087a23d2"
}
},
"core": {
"telemetryConsent": "limited",
"themes": [
"cold-snack-ui",
"cold-snack-syntax"
],
"uriHandlerRegistration": "always"
},
"editor": {
"fontFamily": "IBM Plex Mono Medium",
"fontSize": 12,
"scrollPastEnd": true,
"showIndentGuide": true,
"showInvisibles": true
},
"exception-reporting": {
"userId": "b0ef5d4f-9e74-4048-8eb4-af098c03012d"
},
"php-debug": {
"showWelcome": false
},
"pigments": {
"markerType": "native-underline"
},
"platformio-ide-terminal": {
"core": {
"shell": "/usr/bin/zsh"
},
"style": {
"theme": "ocean"
}
},
"sync-settings": {},
"welcome": {
"showOnStartup": false
}
}
".text.html.php":
"WP Start Loop":
prefix: "wl"
body: "<?php if ( have_posts() ) while ( have_posts() ): the_post(); ?>$1"
description: "Wordpress start while loop"
"WP Edit Link":
prefix: "we"
body: "<?php edit_content_link(); ?>$1"
description: "Wordpress edit_link"
"WP Edit Tag":
prefix: "wet"
body: "<?php edit_tag_link( ' ','<div class=\"adm-edit\"><div class=\"icon-adm-edit\">', '</div></div>' ); ?>$1"
description: "Wordpress edit_tag_link"
"WP Title":
prefix: "wt"
body: "<?php the_title(); ?>$1"
description: "Wordpress the_title"
"WP Get Title":
prefix: "wgt"
body: "<?php echo get_the_title( $post->ID ); ?>$1"
description: "Wordpress get_the_title"
"WP Content":
prefix: "wc"
body: "<?php the_content(); ?>$1"
description: "Wordpress the_content"
"WP Excerpt":
prefix: "wce"
body: "<?php the_excerpt(); ?>$1"
description: "Wordpress the_excerpt"
"WP End Loop":
prefix: "wel"
body: "<?php endwhile; ?>$1"
description: "Wordpress endwhile"
"WP IMG + CSS":
prefix: "wpt"
body: "<?php the_post_thumbnail( '$1', array('class' => '$2') ); ?>"
description: "Wodpress the_post_thumbnail"
"WP Title + Permalink":
prefix: "wtp"
body: "<a title=\"<?php the_title(); ?>\" href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a>$1"
description: "Wordpress title with permalink"
"WP Query Loop":
prefix: "wql"
body: "<?php if ( $query->have_posts() ) while ( $query->have_posts() ) : $query->the_post(); ?>$1"
description: "Wordpress query loop"
"WP Site URL":
prefix: "wsu"
body: "<?php echo site_url(); ?>$1"
description: "Wordpress site URL"
"WP Theme URL":
prefix: "wtu"
body: "<?php bloginfo( 'template_directory' ); ?>$1"
description: "Wordprewss theme URL"
"WP Permalink":
prefix: "wp"
body: "<?php the_permalink(); ?>$1"
description: "Wordpress permalink"
"WP EndIf":
prefix: "weif"
body: "<?php endif; ?>$1"
description: "Wordpress endif"
"WP EndForEach":
prefix: "wefe"
body: "<?php endforeach; ?>$1"
description: "Wordpress endforeach"
"WP EndFor":
prefix: "wef"
body: "<?php endfor; ?>$1"
description: "Wordpress endfor"
"WP Translate":
prefix: "wtr"
body: "<?php _e( \"$1\" ); ?>$2"
description: "Wordpress translate"
"WP Translate Start":
prefix: "wts"
body: "<?php _e( \"$1"
description: "Wordpress translate start"
"WP Translate End":
prefix: "wte"
body: "$1\" ); ?>$2"
description: "Wordpress translate end"
"WP Translate End Quote":
prefix: "wteq"
body: "$1); ?>\"$2"
description: "Wordpress translate end quote"
"WP ACF The Field":
prefix: "watf"
body: "<?php the_field( '$1' ); ?>$2"
description: "Wordpress ACF the_field"
"WP ACF Get Field":
prefix: "wagf"
body: "get_field( '$1' );$2"
description: "Wordpress ACF get_field"
"WP ACF The Sub Field":
prefix: "wats"
body: "<?php the_sub_field( '$1' ); ?>$2"
description: "Wordpress ACF the_sub_field"
"WP ACF Get Sub Field":
prefix: "wags"
body: "get_sub_field( '$1' );$2"
description: "Wordpress ACF get_sub_field"
"WP ACF Loop":
prefix: "wal"
body: "<?php if ( have_rows( '$1' ) ) while ( have_rows( '$1' ) ) : the_row(); ?>$2"
description: "Wordpress ACF Loop"
"WP ACF Option":
prefix: "wao"
body: "<?php the_field( '$1', 'options' ); ?>$2"
description: "Wordpress ACF the_field"
"WP ACF Sub Image":
prefix: "wasi"
body: "<?php $image = get_sub_field( '$1' ); ?>$2"
description: "Wordpress ACF get_sub_field image"
"WP ACF Image":
prefix: "wai"
body: "<?php $image = get_field( '$1' ); ?>$2"
description: "Wordpress ACF get_field image"
"WP ACF Image URL":
prefix: "waiu"
body: "<?= $image['url']; ?>$1"
description: "Wordpress ACF image URL"
"WP ACF Image Alt":
prefix: "waia"
body: "<?= $image['alt']; ?>$1"
description: "Wordpress ACF image alt"
"WP ACF Image with Size":
prefix: "wais"
body: "<?= $image['sizes']['$1']; ?>$2"
description: "Wordpress ACF image with size"
"PHP end if":
prefix: "ei"
body: "<?php endif; ?>"
description: "End if"
"PHP end foreach":
prefix: "efe"
body: "<?php endforeach; ?>"
description: "End foreach"
".source.stylus":
"Convert to EM":
prefix: "em"
body: "em($1)$2"
description: "Convert to EM"
"Convert to REM":
prefix: "re"
body: "rem($1)$2"
description: "Convert to REM"
".source.js":
"jQuery $(this)":
prefix: "th"
body: "$(this).$1"
description: "jQuery $(this)"
".text.html.nunjucks, .text.html.php, .text.html.basic":
"Image Placeholder":
prefix: "imp"
body: "<img src=\"//placehold.it/$1x$2\" alt=\"Placeholder\">$3"
description: "Image placeholder"
"Grid Row":
prefix: "gr"
body: '''
<div class="grid__row">
$1
</div><!-- /.grid__row -->
'''
description: "Grid row"
"Grid Column(s)":
prefix: "grc"
body: '''
<div class="grid__column -$1">
$2
</div><!-- /.grid__column -->
'''
description: "Grid column"
"List With Items":
prefix: "ul"
body: '''
<ul class="$1__list list">
<li class="$1__item">
<a class="$1__link" href="#">$2</a>
</li>
</ul>
'''
description: "Unordered list"
"List Item":
prefix: "li"
body: '''
<li class="$1__item">
<a href="$2">$3</a>
</li>$4
'''
description: "List item"
"Div With Class":
prefix: "div"
body: '''
<div class="$1">
$2
</div>
'''
description: "Div with class"
"Comment (Open / Close)":
prefix: "co"
body: '''
<!-- $1 -->
$2
<!-- /$1 -->
'''
description: "Comment with open / close tags"
Heading:
prefix: "hh"
body: "<h$1 class=\"$2\">$3</h$1>"
description: "Heading"
Link:
prefix: "aa"
body: "<a class=\"$1\" href=\"$2\">$3</a>"
description: "Link"
"Image (Retina) Path":
prefix: "src="
body: "src=\"images/$1\" srcset=\"images/$2\" sizes=\"$3\" alt=\"$4\">$5"
description: "Retina image path"
/*
* 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
*/
atom-text-editor.editor .blame-line {
.hash {
color: #61afef !important;
}
.date {
color: #d19a66 !important;
}
.committer {
color: #e06c75 !important;
}
}
atom-text-editor .blame-gutter {
.hash { color: #61afef; }
.date { color: #d19a66; }
.author { color: #e06c75; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment