Skip to content

Instantly share code, notes, and snippets.

@Jursdotme
Last active October 17, 2017 16:13
Show Gist options
  • Save Jursdotme/7b09ace6eb555d75d292dd0e407674a9 to your computer and use it in GitHub Desktop.
Save Jursdotme/7b09ace6eb555d75d292dd0e407674a9 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 make opened Markdown files always be soft wrapped:
#
# path = require 'path'
#
# atom.workspaceView.eachEditorView (editorView) ->
# editor = editorView.getEditor()
# if path.extname(editor.getPath()) is '.md'
# editor.setSoftWrap(true)
# Your keymap
#
# Atom keymaps work similarly to stylesheets. Just as stylesheets 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:
#
# '.editor':
# 'enter': 'editor:newline'
#
# '.workspace':
# 'ctrl-P': 'core:move-up'
# 'ctrl-p': 'core:move-down'
#
'.workspace':
'ctrl-alt-cmd-m': 'comment-headers:insert'
'.platform-darwin atom-text-editor':
'shift-cmd-h': 'quick-editor:quick-edit'
'ctrl-cmd-/': 'aligner:align'
'ctrl-cmd-a': 'aligner:align'
'.platform-linux atom-text-editor, .platform-win32 atom-text-editor':
'shift-ctrl-h': 'quick-editor:quick-edit'
'.platform-darwin atom-workspace':
'cmd-shift-*': 'toggle-quotes:toggle'
'ctrl-¨': 'terminal-plus:toggle'
'atom-text-editor':
'ctrl-f': 'fold-functions:toggle'
[
{
"name": "about",
"version": "1.7.8"
},
{
"name": "aligner",
"version": "1.2.4"
},
{
"name": "aligner-css",
"version": "1.2.1"
},
{
"name": "aligner-javascript",
"version": "1.3.0"
},
{
"name": "aligner-php",
"version": "1.2.0"
},
{
"name": "aligner-scss",
"version": "1.3.1"
},
{
"name": "archive-view",
"version": "0.63.3"
},
{
"name": "atom-beautify",
"version": "0.30.5"
},
{
"name": "atom-dark-syntax",
"version": "0.28.0",
"theme": "syntax"
},
{
"name": "atom-dark-ui",
"version": "0.53.0",
"theme": "ui"
},
{
"name": "atom-ide-ui",
"version": "0.3.3"
},
{
"name": "atom-light-syntax",
"version": "0.29.0",
"theme": "syntax"
},
{
"name": "atom-light-ui",
"version": "0.46.0",
"theme": "ui"
},
{
"name": "atom-liquid-snippets",
"version": "0.3.0"
},
{
"name": "atom-material-syntax",
"version": "1.0.6",
"theme": "syntax"
},
{
"name": "atom-material-syntax-dark",
"version": "1.0.0",
"theme": "syntax"
},
{
"name": "atom-material-syntax-light",
"version": "0.4.6",
"theme": "syntax"
},
{
"name": "atom-material-ui",
"version": "2.0.4",
"theme": "ui"
},
{
"name": "autocomplete-atom-api",
"version": "0.10.3"
},
{
"name": "autocomplete-css",
"version": "0.17.3"
},
{
"name": "autocomplete-html",
"version": "0.8.1"
},
{
"name": "autocomplete-plus",
"version": "2.35.9"
},
{
"name": "autocomplete-snippets",
"version": "1.11.1"
},
{
"name": "autoflow",
"version": "0.29.0"
},
{
"name": "autosave",
"version": "0.24.3"
},
{
"name": "background-tips",
"version": "0.27.1"
},
{
"name": "base16-tomorrow-dark-theme",
"version": "1.5.0",
"theme": "syntax"
},
{
"name": "base16-tomorrow-light-theme",
"version": "1.5.0",
"theme": "syntax"
},
{
"name": "behave-theme",
"version": "1.7.0",
"theme": "syntax"
},
{
"name": "bookmarks",
"version": "0.44.4"
},
{
"name": "bracket-matcher",
"version": "0.87.3"
},
{
"name": "busy-signal",
"version": "1.4.3"
},
{
"name": "chestnut-light-atom-syntax",
"version": "0.2.1",
"theme": "syntax"
},
{
"name": "color-picker",
"version": "2.2.5"
},
{
"name": "command-palette",
"version": "0.41.1"
},
{
"name": "dalek",
"version": "0.2.1"
},
{
"name": "dark-side-of-the-moon-syntax",
"version": "0.6.45",
"theme": "syntax"
},
{
"name": "deprecation-cop",
"version": "0.56.9"
},
{
"name": "dev-live-reload",
"version": "0.47.1"
},
{
"name": "dracula-syntax",
"version": "2.0.5",
"theme": "syntax"
},
{
"name": "emmet",
"version": "2.4.3"
},
{
"name": "encoding-selector",
"version": "0.23.5"
},
{
"name": "exception-reporting",
"version": "0.41.4"
},
{
"name": "file-icons",
"version": "2.1.11"
},
{
"name": "find-and-replace",
"version": "0.212.2"
},
{
"name": "flatwhite-syntax",
"version": "0.8.1",
"theme": "syntax"
},
{
"name": "fold-functions",
"version": "0.5.0"
},
{
"name": "fuzzy-finder",
"version": "1.5.8"
},
{
"name": "git-diff",
"version": "1.3.6"
},
{
"name": "github",
"version": "0.5.1"
},
{
"name": "go-to-line",
"version": "0.32.1"
},
{
"name": "grammar-selector",
"version": "0.49.5"
},
{
"name": "highlight-selected",
"version": "0.13.1"
},
{
"name": "ide-php",
"version": "0.6.2"
},
{
"name": "ide-typescript",
"version": "0.6.1"
},
{
"name": "image-view",
"version": "0.62.3"
},
{
"name": "incompatible-packages",
"version": "0.27.3"
},
{
"name": "intentions",
"version": "1.1.5"
},
{
"name": "jsfiddle-like-syntax",
"version": "0.2.10",
"theme": "syntax"
},
{
"name": "jursdotme-syntax",
"version": "0.0.0",
"theme": "syntax"
},
{
"name": "keybinding-resolver",
"version": "0.38.0"
},
{
"name": "language-c",
"version": "0.58.1"
},
{
"name": "language-clojure",
"version": "0.22.4"
},
{
"name": "language-coffee-script",
"version": "0.49.0"
},
{
"name": "language-csharp",
"version": "0.14.2"
},
{
"name": "language-css",
"version": "0.42.5"
},
{
"name": "language-gfm",
"version": "0.90.1"
},
{
"name": "language-git",
"version": "0.19.1"
},
{
"name": "language-go",
"version": "0.44.2"
},
{
"name": "language-html",
"version": "0.47.7"
},
{
"name": "language-hyperlink",
"version": "0.16.2"
},
{
"name": "language-java",
"version": "0.27.4"
},
{
"name": "language-javascript",
"version": "0.127.3"
},
{
"name": "language-json",
"version": "0.19.1"
},
{
"name": "language-less",
"version": "0.33.0"
},
{
"name": "language-liquid",
"version": "0.6.0"
},
{
"name": "language-make",
"version": "0.22.3"
},
{
"name": "language-mustache",
"version": "0.14.1"
},
{
"name": "language-objective-c",
"version": "0.15.1"
},
{
"name": "language-perl",
"version": "0.37.0"
},
{
"name": "language-php",
"version": "0.41.0"
},
{
"name": "language-property-list",
"version": "0.9.1"
},
{
"name": "language-python",
"version": "0.45.4"
},
{
"name": "language-ruby",
"version": "0.71.3"
},
{
"name": "language-ruby-on-rails",
"version": "0.25.2"
},
{
"name": "language-sass",
"version": "0.61.1"
},
{
"name": "language-shellscript",
"version": "0.25.3"
},
{
"name": "language-source",
"version": "0.9.0"
},
{
"name": "language-sql",
"version": "0.25.8"
},
{
"name": "language-text",
"version": "0.7.3"
},
{
"name": "language-todo",
"version": "0.29.2"
},
{
"name": "language-toml",
"version": "0.18.1"
},
{
"name": "language-typescript",
"version": "0.1.0"
},
{
"name": "language-xml",
"version": "0.35.2"
},
{
"name": "language-yaml",
"version": "0.30.2"
},
{
"name": "line-count",
"version": "0.5.0"
},
{
"name": "line-ending-selector",
"version": "0.7.3"
},
{
"name": "link",
"version": "0.31.3"
},
{
"name": "linter",
"version": "2.2.0"
},
{
"name": "linter-csslint",
"version": "2.0.0"
},
{
"name": "linter-eslint",
"version": "8.2.1"
},
{
"name": "linter-markdown",
"version": "5.2.0"
},
{
"name": "linter-phpmd",
"version": "1.5.3"
},
{
"name": "linter-sass-lint",
"version": "1.7.6"
},
{
"name": "linter-scss-lint",
"version": "3.1.1"
},
{
"name": "linter-tidy",
"version": "2.3.1"
},
{
"name": "linter-ui-default",
"version": "1.6.8"
},
{
"name": "loved-syntax",
"version": "1.0.2",
"theme": "syntax"
},
{
"name": "markdown-preview",
"version": "0.159.13"
},
{
"name": "metrics",
"version": "1.2.6"
},
{
"name": "minimap",
"version": "4.29.6"
},
{
"name": "minimap-find-and-replace",
"version": "4.5.2"
},
{
"name": "minimap-git-diff",
"version": "4.3.1"
},
{
"name": "minimap-highlight-selected",
"version": "4.6.1"
},
{
"name": "minimap-pigments",
"version": "0.2.2"
},
{
"name": "nord-atom-syntax",
"version": "0.9.1",
"theme": "syntax"
},
{
"name": "nord-atom-ui",
"version": "0.11.0",
"theme": "ui"
},
{
"name": "northem-atom-syntax",
"version": "2.1.0",
"theme": "syntax"
},
{
"name": "northem-dark-atom-syntax",
"version": "2.1.0",
"theme": "syntax"
},
{
"name": "northem-light-atom-syntax",
"version": "2.1.0",
"theme": "syntax"
},
{
"name": "notifications",
"version": "0.69.2"
},
{
"name": "nucleus-dark-ui",
"version": "0.12.3",
"theme": "ui"
},
{
"name": "one-dark-syntax",
"version": "1.8.0",
"theme": "syntax"
},
{
"name": "one-dark-ui",
"version": "1.10.8",
"theme": "ui"
},
{
"name": "one-light-syntax",
"version": "1.8.0",
"theme": "syntax"
},
{
"name": "one-light-ui",
"version": "1.10.8",
"theme": "ui"
},
{
"name": "open-on-github",
"version": "1.2.1"
},
{
"name": "package-generator",
"version": "1.1.1"
},
{
"name": "pigments",
"version": "0.40.2"
},
{
"name": "prettier-atom",
"version": "0.39.0"
},
{
"name": "project-plus",
"version": "1.0.0"
},
{
"name": "pure-syntax",
"version": "0.3.0",
"theme": "syntax"
},
{
"name": "regex-filter-and-generator",
"version": "1.4.2"
},
{
"name": "settings-view",
"version": "0.251.8"
},
{
"name": "snippets",
"version": "1.1.4"
},
{
"name": "solarized-dark-syntax",
"version": "1.1.2",
"theme": "syntax"
},
{
"name": "solarized-light-syntax",
"version": "1.1.2",
"theme": "syntax"
},
{
"name": "spell-check",
"version": "0.72.2"
},
{
"name": "status-bar",
"version": "1.8.13"
},
{
"name": "styleguide",
"version": "0.49.6"
},
{
"name": "symbols-view",
"version": "0.118.0"
},
{
"name": "sync-settings",
"version": "0.8.3"
},
{
"name": "tabs",
"version": "0.107.2"
},
{
"name": "terminal-plus",
"version": "0.14.5"
},
{
"name": "timecop",
"version": "0.36.0"
},
{
"name": "tree-view",
"version": "0.217.9"
},
{
"name": "tree-view-autoresize",
"version": "2.2.0"
},
{
"name": "tree-view-git-status",
"version": "1.4.0"
},
{
"name": "update-package-dependencies",
"version": "0.12.0"
},
{
"name": "welcome",
"version": "0.36.5"
},
{
"name": "whitespace",
"version": "0.37.2"
},
{
"name": "wordpress-autocomplete",
"version": "1.2.0"
},
{
"name": "wrap-guide",
"version": "0.40.2"
}
]
{
"Zen": {},
"activate-power-mode": {
"particles": {
"size": {}
}
},
"aligner": {
":-alignment": "left",
":-leftSpace": true,
"alignComments": true
},
"atom-beautify": {
"css": {},
"general": {
"_analyticsUserId": "12977a55-6918-4c3b-8968-acbeb6e32606"
},
"html": {
"beautify_on_save": true
},
"js": {
"jslint_happy": true,
"keep_array_indentation": true,
"keep_function_indentation": true,
"space_in_paren": true
},
"less": {
"beautify_on_save": true,
"convert_quotes": "single",
"force_indentation": true
},
"php": {
"cs_fixer_path": "php-cs-fixer"
},
"sass": {},
"scss": {
"configPath": "/Users/jurs/.csscomb.json",
"convert_quotes": "single",
"default_beautifier": "CSScomb",
"preserve_newlines": true
}
},
"atom-material-ui": {
"colors": {
"abaseColor": "#2196f3",
"accentColor": "#ff4e65",
"paintCursor": true,
"predefinedColor": "Blue"
},
"fonts": {
"fontSize": 14
},
"tabs": {
"compactTabs": true,
"noTabMinWidth": true,
"tintedTabBar": true
},
"treeView": {
"blendTabs": true,
"compactList": true
},
"ui": {
"panelContrast": true,
"panelShadows": true
}
},
"color": {
"fillColorAsBackground": false
},
"color-picker": {},
"core": {
"disabledPackages": [
"activate-power-mode",
"linter-phpmd",
"linter-sass-lint",
"linter",
"linter-ui-default",
"atom-beautify",
"linter-scss-lint",
"linter-markdown",
"linter-eslint",
"linter-csslint",
"linter-tidy",
"project-plus",
"terminal-plus"
],
"excludeVcsIgnoredPaths": false,
"openEmptyEditorOnStart": false,
"packagesWithKeymapsDisabled": [
"aligner"
],
"telemetryConsent": "no",
"themes": [
"atom-material-ui",
"atom-material-syntax-light"
],
"titleBar": "custom"
},
"css-comb": {
"config": "zen"
},
"editor": {
"confirmCheckoutHeadRevision": false,
"fontFamily": "Fira Mono",
"invisibles": {},
"preferredLineLength": 110,
"showIndentGuide": true,
"tabLength": 4,
"useHardwareAcceleration": false
},
"emmet": {},
"exception-reporting": {
"userId": "3332bc66-3aec-b492-9d73-461c2300a41a"
},
"fold-functions": {},
"genesis-ui": {
"distractionFree": {
"hideFiles": false
},
"treeView": {}
},
"linter": {},
"linter-phpmd": {
"executablePath": ".composer/vendor/bin/phpmd"
},
"linter-scss-lint": {
"scssLintExcludedLinters": "PropertySortOrder,SelectorDepth"
},
"linter-ui-default": {
"panelHeight": 143,
"showPanel": true
},
"markdown-preview": {
"breakOnSingleNewline": true
},
"markdown-table-formatter": {},
"markdown-writer": {
"fileExtension": ".md",
"siteEngine": "jekyll",
"siteImagesDir": "img/portfolio/",
"siteLocalDir": "/Users/Rasmus/Desktop/username.github.io",
"siteUrl": "jurs.me"
},
"metrics": {
"userId": "18c29e8c4714a99ac297c45afbdc1d43cf6cd7cd"
},
"minimap": {
"plugins": {
"find-and-replace": true,
"find-and-replaceDecorationsZIndex": 0,
"git-diff": true,
"git-diffDecorationsZIndex": 0,
"highlight-selected": true,
"highlight-selectedDecorationsZIndex": 0,
"pigments": true,
"pigmentsDecorationsZIndex": 0
}
},
"one-dark-ui": {
"layoutMode": "Compact"
},
"one-light-ui": {},
"pigments": {
"ignoredNames": [
"build/",
"bower_components/",
"node_modules/"
],
"notifyReloads": false,
"sassShadeAndTintImplementation": "bourbon",
"sortPaletteColors": "by color"
},
"prettier-atom": {
"formatOnSaveOptions": {
"enabled": true
},
"prettierOptions": {
"singleQuote": true
}
},
"project-manager": {},
"px-to-rem": {},
"release-notes": {
"viewedVersion": "0.95.0"
},
"sync-settings": {},
"terminal-plus": {
"ansiColors": {
"normal": {
"black": "#262626",
"blue": "#6284cd",
"green": "#66cd8f",
"magenta": "#c379cd",
"red": "#ed4c6e",
"yellow": "#e0cc80"
}
},
"core": {},
"style": {
"defaultPanelHeight": "100px",
"fontSize": "12"
}
},
"terminal-status": {},
"tree-view": {
"autoReveal": true,
"hideVcsIgnoredFiles": 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'
#
'.scss, .js':
'Comment - Full section comment':
'prefix': 'comm'
'body':'/*======================= ${1:Section comment block} =======================*/\n\n$2\n\n/*------------------- End of ${1:Section comment block} --------------------*/'
'.html':
'Comment - Full section comment':
'prefix': 'comm'
'body':'<!-- ${1:html comment} -->'
# Wordpress Snippets
'Make translateable string':
'prefix': 'translate'
'body': '<?php _e(\'$1\', \'toro\'); ?>'
'ACF Repeater':
'prefix': 'acfrepeater'
'body':'<?php if( have_rows(\'repeater_field_name\') ): ?>\n\n <?php while ( have_rows(\'repeater_field_name\') ) : the_row(); ?>\n\n <?php the_sub_field(\'sub_field_name\'); ?>\n\n <?php endwhile; ?>\n\n<?php endif; ?>\n'
'ACF Image output':
'prefix': 'acfimg'
'body':'<?php\n // Setup Image data\n $id = get_field(\'topbillede\');\n $size = \'full\'; // (thumbnail, medium, large, full or custom size)\n $image_attributes = wp_get_attachment_image_src( $id, $size );\n
?>\n \n<img src="<?php echo $image_attributes[0]; ?>" width="<?php echo $image_attributes[1]; ?>" height="<?php echo $image_attributes[2]; ?>">\n'
'ACF Relationship field':
'prefix': 'acfrelationship'
'body':'<?php\n\n$posts = get_field(\'relationship_field_name\');\n\nif( $posts ): ?>\n <ul>\n <?php foreach( $posts as $post): // variable must be called $post (IMPORTANT) ?>\n <?php setup_postdata($post); ?>\n <li>\n <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>\n <span>Custom field from $post: <?php the_field(\'author\'); ?></span>\n </li>\n <?php endforeach; ?>\n </ul>\n <?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>\n<?php endif; ?>\n'
'ACF Gallery':
'prefix': 'acfgallery'
'body':'<?php\n \n$images = get_field(\'gallery\');\n\nif( $images ): ?>\n <ul>\n <?php foreach( $images as $image ): ?>\n <li>\n <a href="<?php echo $image[\'url\']; ?>">\n <img src="<?php echo $image[\'sizes\'][\'thumbnail\']; ?>" alt="<?php echo $image[\'alt\']; ?>" />\n </a>\n <p><?php echo $image[\'caption\']; ?></p>\n </li>\n <?php endforeach; ?>\n </ul>\n<?php endif; ?>\n'
# WOOCOMMERCE SNIPPETS
'Woocommerce Remove Action':
'prefix': 'wcremoveaction'
'body': "remove_action( 'the_hook', 'the_action', 5 );"
'Woocommerce change action':
'prefix': 'wcchangeaction'
'body': "remove_action( 'hook', 'function_to_edit', 10 );\nadd_action('hook', 'function_name', 10);\nfunction function_name() {\n echo '<div class=\"class\">';\n function_to_edit();\n echo '</div>';\n}"
'Media Query':
'prefix': 'media'
'body': "@media screen and (max-width: 480px) {}"
'.scss, .js, .css, .php':
'Comment - Section comment':
'prefix': 'commsection'
'body':'/*--------------------------------------------*\n * ${1:Block comment}\n/*--------------------------------------------*/\n\n// END ${1:Block comment}'
'Comment - Full section comment':
'prefix': 'commblock'
'body':'/**\n * ${1:Block comment}\n **/'
'Comment - single line':
'prefix': 'comm'
'body':'/* ========== ${1:Block comment} ========== */\n'
'.php':
'Comment - Section comment':
'prefix': 'comm'
'body':'/**\n* ${1:Block comment}\n*/'
'get_template_directory':
'prefix': 'templatedir'
'body':'get_template_directory_uri()'
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
.tree-view {
}
.editor {
}
.editor .cursor {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment