Skip to content

Instantly share code, notes, and snippets.

@joestrong
Last active April 28, 2016 17:36
Show Gist options
  • Save joestrong/8b619a3dca570fd13bd8 to your computer and use it in GitHub Desktop.
Save joestrong/8b619a3dca570fd13bd8 to your computer and use it in GitHub Desktop.
Atom Settings
# 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:
# * https://atom.io/docs/latest/using-atom-basic-customization#customizing-key-bindings
# * https://atom.io/docs/latest/behind-atom-keymaps-in-depth
#
# If you're having trouble with your keybindings not working, try the
# Keybinding Resolver: `Cmd+.` on OS X and `Ctrl+.` on other platforms. See the
# Debugging Guide for more information:
# * https://atom.io/docs/latest/hacking-atom-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:
# https://atom.io/docs/latest/using-atom-basic-customization#cson
'atom-text-editor.vim-mode.insert-mode':
'j j': 'vim-mode:reset-normal-mode'
'atom-text-editor[data-grammar="text plain null-grammar"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'
# 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:
# https://atom.io/docs/latest/using-atom-basic-customization#cson
'.text.html.basic':
'HTML Bootstrap':
'prefix': 'html'
'body': """
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IEa=edge,chrome=1">
<meta name="author" content="Joe Strong">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="theme-color" content="#FFFFFF">
<title>$1</title>
<link rel="manifest" href="/manifest.json">
</head>
<body>
$2
</body>
</html>
"""
'.source.js':
'JS Bootstrap':
'prefix': 'js'
'body': """
"use strict";
class ${1:MyClass} {
constructor() {
$2
}
}
new $1();
"""
'Gulpfile':
'prefix': 'gulp'
'body': """
"use strict";
let gulp = require('gulp');
let rename = require('gulp-rename');
let sass = require('gulp-sass');
let watchPaths = {
sass: './sass/**/*.scss',
js: './js/**/*.js'
};
let sourceFiles = {
sass: './sass/app.scss',
js: './js/app.js',
};
let dest = './';
gulp.task('sass', function() {
gulp.src(sourceFiles.sass)
.pipe(sass())
.pipe(rename('app.min.css'))
.pipe(gulp.dest(dest));
});
gulp.task('scripts', function() {
gulp.src(sourceFiles.js)
.pipe(rename('app.min.js'))
.pipe(gulp.dest(dest));
});
gulp.task('default', ['sass', 'scripts']);
gulp.task('watch', function() {
gulp.watch(watchPaths.sass, ['sass']);
gulp.watch(watchPaths.js, ['scripts']);
});
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment