Skip to content

Instantly share code, notes, and snippets.

@trandaison
Last active May 24, 2017 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trandaison/81eb4ab657fb7af43d797344176e7127 to your computer and use it in GitHub Desktop.
Save trandaison/81eb4ab657fb7af43d797344176e7127 to your computer and use it in GitHub Desktop.
Atom configs
'.source.ruby':
'Redirect to':
'prefix': 'redi'
'body': "redirect_to ${1:some}_path"
'flash[:key] = value':
'prefix': 'flash'
'body': 'flash[${1::success}] = ${2:"Created successfully."}$3'
'render json':
'prefix': 'renjson'
'body': """
render json: {${1::${2:key}: "${3:value}"}}, ${4:status: ${5:200}}
"""
'render js: "alert(true)"':
'prefix': 'renderjs'
'body': 'render js: "${1:alert(true);}"'
'current_user':
'prefix': 'currentuser'
'body': 'current_${1:user}$2'
'.text.html.erb':
'if statement':
'prefix': 'if'
'body': """
<% if ${1:true} %>
${2:<!--true-->}
<% end %>
"""
'if - else statement':
'prefix': 'ife'
'body': """
<% if ${1:true} %>
${2:<!--true-->}
<% else %>
${3:<!-- false -->}
<% end %>
"""
'unless statement':
'prefix': 'unless'
'body': """
<% unless ${1:false} %>
${2:<!--true-->}
<% end %>
"""
'unless statement':
'prefix': 'iffalse'
'body': """
<% unless ${1:false} %>
${2:<!--true-->}
<% end %>
"""
'class: "erb-class"':
'prefix': 'clas'
'body': 'class: "$1"'
'id: "erb-id"':
'prefix': 'id'
'body': 'id: "$1"'
'<%= link_to %>':
'prefix': 'linkto'
'body': '<%= link_to ${1:text}, ${2:resource}_path %>'
'<%= link_to ... do %>':
'prefix': 'linktodo'
'body': """
<%= link_to ${1:resource}_path do %>
<% end %>
"""
'<%= render @resources %>':
'prefix': 'rend'
'body': '<%= render @${1:resources} %>'
'<%= render "partial" %>':
'prefix': 'renderp'
'body': '<%= render "${1:partial}" %>'
'.text.js.erb':
'if statement':
'prefix': '-if'
'body': """
<% if ${1:true} %>
${2:<!--true-->}
<% end %>
"""
'if - else statement':
'prefix': '-ife'
'body': """
<% if ${1:true} %>
${2:<!--true-->}
<% else %>
${3:<!-- false -->}
<% end %>
"""
'unless statement':
'prefix': '-unless'
'body': """
<% unless ${1:false} %>
${2:<!--true-->}
<% end %>
"""
'function':
'prefix': 'function'
'body': """
function($1) {
${2:#code block}
}
"""
"*":
"advanced-open-file":
createDirectories: true
createFileInstantly: true
defaultInputValue: "Project root"
"atom-beautify":
css:
indent_size: 2
erb:
indent_size: 2
general:
_analyticsUserId: "40ca3508-cffc-4b49-8598-89370a3fee67"
html:
indent_size: 2
js:
indent_size: 2
scss:
indent_size: 2
"autocomplete-ruby": {}
"browser-plus": {}
"chrome-color-picker":
General: {}
core:
autoHideMenuBar: true
destroyEmptyPanes: false
disabledPackages: [
"linter-rubocop"
"minimap"
"browser-plus"
"linter"
"docblockr"
"tabs-to-spaces"
"advanced-open-file"
"atom-beautify"
"atom-prettify"
"git-blame"
"goto-definition"
"linter-erb"
"linter-ruby"
"rails-snippets"
"ruby-block"
"ruby-slim"
"terminal-fusion"
]
excludeVcsIgnoredPaths: false
openEmptyEditorOnStart: false
telemetryConsent: "no"
themes: [
"one-dark-ui"
"chester-atom-2-syntax"
]
editor:
invisibles: {}
lineHeight: 2.3
tabType: "soft"
"exception-reporting":
userId: "8f169ced-0194-0b10-5d67-5f324d84893f"
"git-blame":
columnWidth: 300
linter:
errorPanelHeight: 22
"rest-client":
recent_requests_limit: 20
split: "right"
"ruby-block":
highlightLineNumber: true
"tabs-to-spaces":
onSave: "untabify"
"terminal-fusion":
core:
workingDirectory: "Project"
"tree-view": {}
"tree-view-search-bar": {}
welcome:
showOnStartup: false
".blade.html.php.text":
editor:
commentEnd: " --}}"
commentStart: "{{-- "
tabLength: 2
@font-size: 11px;
@tab-font-size: 11px;
html, body, .tree-view {
font-size: @font-size;
}
html, body, .tab-bar .tab {
font-size: @tab-font-size;
}
/* Ruby block */
@highlight: #404F62;
:host, atom-text-editor, atom-text-editor::shadow {
.line-number.ruby-block-highlight {
background-color: @highlight;
}
.highlights {
.ruby-block-highlight .region {
background-color: @highlight;
}
}
}
/* The rule for normal highlights */
.minimap .highlight-selected {
background: blue;
}
/* The rule for selected highlights */
.minimap .highlight-selected.selected {
background: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment