Skip to content

Instantly share code, notes, and snippets.

@drewrawitz
Last active April 29, 2018 04:00
Show Gist options
  • Save drewrawitz/e3d2d4ea57fce3f59448 to your computer and use it in GitHub Desktop.
Save drewrawitz/e3d2d4ea57fce3f59448 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()}"
# For Vim mode
# https://github.com/atom/vim-mode/issues/128
atom.commands.add 'atom-text-editor', 'custom:wait-key-press', (e)->
oe = e.originalEvent
char = String.fromCharCode(oe.which)
char = char.toLowerCase() unless oe.shift
atom.workspace.getActivePaneItem().insertText(char)
# 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
'body .vim-mode-plus:not(.insert-mode)':
'space w': 'core:save'
'ctrl-m': 'pane:show-next-item'
'ctrl-n': 'pane:show-previous-item'
'ctrl-z': 'project-find:show'
'.platform-darwin .vim-mode-plus:not(.insert-mode)':
'space n': 'tree-view:toggle'
'space b': 'fuzzy-finder:toggle-buffer-finder'
'ctrl-a ctrl-j': 'project-ring:toggle'
'cmd-g': 'git-plus:menu'
'ctrl-g ctrl-d': 'git-diff:toggle-diff-list'
'.platform-darwin .tree-view':
'space n': 'tree-view:toggle'
'ctrl-l': 'tree-view:toggle-focus'
'atom-pane-container atom-pane:first-child.active':
'ctrl-h': 'tree-view:toggle-focus'
'atom-text-editor.vim-mode-plus:not(.insert-mode)':
'ctrl-d': 'unset!'
'ctrl-k': 'window:focus-pane-above'
'ctrl-j': 'window:focus-pane-below'
'atom-workspace':
'ctrl-h': 'window:focus-pane-on-left'
'ctrl-l': 'window:focus-pane-on-right'
'ctrl-p': 'fuzzy-finder:toggle-file-finder'
'ctrl-d': 'core:close'
'ctrl-j': 'core:move-down'
'ctrl-k': 'core:move-up'
'ctrl-a ctrl-j': 'project-ring:toggle'
'escape': 'core:cancel'
'ctrl-t': 'terminal-panel:toggle'
'atom-text-editor':
'ctrl-k': 'unset!'
'ctrl-t': 'unset!'
'.fuzzy-finder atom-text-editor[mini]':
'ctrl-v': 'pane:split-right'
'ctrl-s': 'pane:split-down'
'ctrl-j': 'core:move-down'
'ctrl-k': 'core:move-up'
'atom-workspace atom-text-editor:not([mini]).vim-mode-plus:not(.insert-mode)':
'g c c': 'editor:toggle-line-comments'
# Vim Commands
# Use jj to escape insert mode
'atom-text-editor.vim-mode-plus.insert-mode':
'j': 'custom:wait-key-press'
'.vim-mode-plus.insert-mode:not(.mini)':
'j j': 'vim-mode-plus:activate-command-mode'
[
{
"name": "about",
"version": "1.8.0"
},
{
"name": "archive-view",
"version": "0.64.3"
},
{
"name": "atom-beautify",
"version": "0.30.9"
},
{
"name": "atom-dark-syntax",
"version": "0.29.0",
"theme": "syntax"
},
{
"name": "atom-dark-ui",
"version": "0.53.2",
"theme": "ui"
},
{
"name": "atom-light-syntax",
"version": "0.29.0",
"theme": "syntax"
},
{
"name": "atom-light-ui",
"version": "0.46.2",
"theme": "ui"
},
{
"name": "autocomplete-atom-api",
"version": "0.10.7"
},
{
"name": "autocomplete-css",
"version": "0.17.5"
},
{
"name": "autocomplete-html",
"version": "0.8.4"
},
{
"name": "autocomplete-modules",
"version": "2.0.0"
},
{
"name": "autocomplete-plus",
"version": "2.40.5"
},
{
"name": "autocomplete-snippets",
"version": "1.12.0"
},
{
"name": "autoflow",
"version": "0.29.3"
},
{
"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.1"
},
{
"name": "busy-signal",
"version": "1.4.3"
},
{
"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": "double-tag",
"version": "1.4.0"
},
{
"name": "editorconfig",
"version": "2.2.2"
},
{
"name": "emmet",
"version": "2.4.3"
},
{
"name": "encoding-selector",
"version": "0.23.8"
},
{
"name": "es6-javascript",
"version": "1.0.0"
},
{
"name": "ex-mode",
"version": "0.18.0"
},
{
"name": "exception-reporting",
"version": "0.43.1"
},
{
"name": "file-icons",
"version": "2.1.19"
},
{
"name": "find-and-replace",
"version": "0.215.5"
},
{
"name": "fuzzy-finder",
"version": "1.8.1"
},
{
"name": "git-diff",
"version": "1.3.9"
},
{
"name": "git-plus",
"version": "7.10.2"
},
{
"name": "github",
"version": "0.12.0"
},
{
"name": "go-to-line",
"version": "0.33.0"
},
{
"name": "grammar-selector",
"version": "0.50.0"
},
{
"name": "image-view",
"version": "0.62.4"
},
{
"name": "incompatible-packages",
"version": "0.27.3"
},
{
"name": "intentions",
"version": "1.1.5"
},
{
"name": "keybinding-resolver",
"version": "0.38.1"
},
{
"name": "language-c",
"version": "0.59.3"
},
{
"name": "language-clojure",
"version": "0.22.7"
},
{
"name": "language-coffee-script",
"version": "0.49.3"
},
{
"name": "language-csharp",
"version": "1.0.1"
},
{
"name": "language-css",
"version": "0.42.10"
},
{
"name": "language-gfm",
"version": "0.90.3"
},
{
"name": "language-git",
"version": "0.19.1"
},
{
"name": "language-go",
"version": "0.45.3"
},
{
"name": "language-html",
"version": "0.49.0"
},
{
"name": "language-hyperlink",
"version": "0.16.3"
},
{
"name": "language-java",
"version": "0.29.0"
},
{
"name": "language-javascript",
"version": "0.128.5"
},
{
"name": "language-json",
"version": "0.19.1"
},
{
"name": "language-less",
"version": "0.34.2"
},
{
"name": "language-make",
"version": "0.22.3"
},
{
"name": "language-mustache",
"version": "0.14.5"
},
{
"name": "language-objective-c",
"version": "0.15.1"
},
{
"name": "language-perl",
"version": "0.38.1"
},
{
"name": "language-php",
"version": "0.43.2"
},
{
"name": "language-property-list",
"version": "0.9.1"
},
{
"name": "language-python",
"version": "0.49.4"
},
{
"name": "language-ruby",
"version": "0.71.4"
},
{
"name": "language-ruby-on-rails",
"version": "0.25.3"
},
{
"name": "language-sass",
"version": "0.61.4"
},
{
"name": "language-shellscript",
"version": "0.26.3"
},
{
"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.3"
},
{
"name": "language-vue",
"version": "0.23.1"
},
{
"name": "language-xml",
"version": "0.35.2"
},
{
"name": "language-yaml",
"version": "0.32.0"
},
{
"name": "line-ending-selector",
"version": "0.7.5"
},
{
"name": "link",
"version": "0.31.4"
},
{
"name": "linter",
"version": "2.2.0"
},
{
"name": "linter-eslint",
"version": "8.4.1"
},
{
"name": "linter-stylelint",
"version": "4.3.0"
},
{
"name": "linter-ui-default",
"version": "1.7.1"
},
{
"name": "markdown-preview",
"version": "0.159.20"
},
{
"name": "markdown-preview-plus",
"version": "2.5.8"
},
{
"name": "merge-conflicts",
"version": "1.4.5"
},
{
"name": "metrics",
"version": "1.2.6"
},
{
"name": "minimap",
"version": "4.29.7"
},
{
"name": "notifications",
"version": "0.70.5"
},
{
"name": "one-dark-syntax",
"version": "1.8.2",
"theme": "syntax"
},
{
"name": "one-dark-ui",
"version": "1.11.0",
"theme": "ui"
},
{
"name": "one-light-syntax",
"version": "1.8.2",
"theme": "syntax"
},
{
"name": "one-light-ui",
"version": "1.11.0",
"theme": "ui"
},
{
"name": "one-tab",
"version": "0.10.0"
},
{
"name": "open-on-github",
"version": "1.3.1"
},
{
"name": "package-generator",
"version": "1.3.0"
},
{
"name": "pigments",
"version": "0.40.2"
},
{
"name": "prettier-atom",
"version": "0.53.0"
},
{
"name": "react",
"version": "0.18.0"
},
{
"name": "react-snippets",
"version": "1.1.0"
},
{
"name": "release-notes",
"version": "0.53.0"
},
{
"name": "settings-view",
"version": "0.254.2"
},
{
"name": "snippets",
"version": "1.3.3"
},
{
"name": "solarized-dark-syntax",
"version": "1.1.4",
"theme": "syntax"
},
{
"name": "solarized-light-syntax",
"version": "1.1.4",
"theme": "syntax"
},
{
"name": "spell-check",
"version": "0.73.4"
},
{
"name": "status-bar",
"version": "1.8.15"
},
{
"name": "styleguide",
"version": "0.49.10"
},
{
"name": "symbols-view",
"version": "0.118.2"
},
{
"name": "sync-settings",
"version": "0.8.6"
},
{
"name": "tabs",
"version": "0.109.1"
},
{
"name": "timecop",
"version": "0.36.2"
},
{
"name": "tree-view",
"version": "0.221.3"
},
{
"name": "update-package-dependencies",
"version": "0.13.1"
},
{
"name": "vim-mode-plus",
"version": "1.32.0"
},
{
"name": "welcome",
"version": "0.36.6"
},
{
"name": "whitespace",
"version": "0.37.5"
},
{
"name": "wrap-guide",
"version": "0.40.3"
}
]
{
"atom-beautify": {
"general": {
"_analyticsUserId": "d8b23d03-9eb7-4917-9810-8c73c2ba72c2",
"analytics": false
},
"scss": {
"newline_between_rules": true
}
},
"atom-pair": {
"slack_url": "https://hooks.slack.com/services/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"
},
"core": {
"disabledPackages": [
"wrap-guide",
"gulp-control",
"Remote-FTP",
"atom-beautify",
"whitespace"
],
"ignoredNames": [
".git",
".hg",
".svn",
".DS_Store",
"._*",
"Thumbs.db",
"desktop.ini",
"node_modules"
],
"packagesWithKeymapsDisabled": [],
"telemetryConsent": "no"
},
"editor": {
"fontSize": 12
},
"exception-reporting": {
"userId": "653c1077-b8fc-68cf-d5d6-82c963326f77"
},
"fuzzy-finder": {
"ignoredNames": [
".git",
"node_modules",
"vendor"
]
},
"git-plus": {
"general": {
"_analyticsUserId": "60d80ba7-7231-453f-99ef-05a55513c61b"
}
},
"gulp-task-launcher": {
"assets": true,
"compile": true,
"compile:sass": true,
"css": true,
"default": true,
"dist-nerdist": true,
"html": true,
"liveLdnCss": true,
"production": true,
"scripts": true,
"server": true,
"staging": true,
"stagingLdnCss": true,
"tasks": [
"assets",
"compile",
"compile:sass",
"css",
"default",
"dist-nerdist",
"html",
"liveLdnCss",
"production",
"scripts",
"server",
"staging",
"stagingLdnCss",
"watch",
"watchHtml",
"watchScripts"
],
"watch": true,
"watchHtml": true,
"watchScripts": true
},
"prettier-atom": {
"formatOnSaveOptions": {
"enabled": true
},
"useEslint": true,
"useStylelint": true
},
"project-ring": {
"doNotSaveAndRestoreOpenProjectFiles": true
},
"sync-settings": {},
"tree-view": {
"hideVcsIgnoredFiles": true
},
"welcome": {
"showOnStartup": false
},
"whitespace": {
"ensureSingleTrailingNewline": 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'
#
# 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
'.source.elixir, .text.html.elixir':
'new_view':
'prefix': 'view'
'body': """
defmodule $1.$2 do
use $1.Web, :view
end
"""
'new_controller':
'prefix': 'controller'
'body': """
defmodule $1.$2 do
use $1.Web, :controller
def $3(conn, _) do
render conn, "$3.html"
end
end
"""
'module_plug':
'prefix': 'mplug'
'body': """
defmodule $1 do
def init(opts) do
$2
end
def call(conn, _opts) do
$3
end
end
"""
'eex_for':
'prefix': 'for'
'body': """
<%= for ${1:model} <- @${1:model}s do %>
$2
<% end %>
"""
'eex_error_tag':
'prefix': 'et'
'body': '<%= error_tag ${1:f}, :${2:field} %>'
'eex_text_input':
'prefix': 'ti'
'body': '<%= text_input ${1:f}, :${2:field} %>'
'eex_password_input':
'prefix': 'pi'
'body': '<%= password_input ${1:f}, :${2:field} %>'
'eex_link':
'prefix': 'lt'
'body': """
<%= link "${1:text}", to: ${2:url} %>
"""
'eex_if':
'prefix': 'if'
'body': """
<%= if $1 do %>
$2
<% end %>
"""
'eex_if_else':
'prefix': 'ife'
'body': """
<%= if $1 do %>
$2
<% else %>
$3
<% end %>
"""
'eex_else':
'prefix': 'else'
'body': "<% else %>"
/*
* 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 {
}
// style the background and foreground colors on the atom-text-editor-element
// itself
atom-text-editor {
}
// To style other content in the text editor's shadow DOM, use the ::shadow
// expression
atom-text-editor::shadow .cursor {
}
atom-workspace {
font-size: 15px;
}
atom-text-editor {
font-family: "IBM Plex Mono";
font-size: 15px;
font-weight: 400;
line-height: 1.7;
}
atom-panel.tool-panel {
font-size: 0.88em;
}
atom-text-editor::shadow{
.entity.other.attribute-name {
font-style: italic;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment