Skip to content

Latest commit

 

History

History
 
 

sublime

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Sublime Text Snippets

Keyboard Karate that matches our mostly reasonable approach to JavaScript

Installation

Move the javascript folder to ~/Library/Application Support/Sublime Text 2/Packages/User/

Guide

Sublime Text snippets work when you type some letters (let's call them commands), then you hit enter to insert the snippet. Then additional tabs will move your cursor to the next anchor point. Anchor points are illustrated in this guide as sequential number counts. 1 is where the cursor will start, pressing tab will take you to 2 and so on.

  1. vo: var object
  2. va: var array
  3. vs: var string
  4. if: if statement
  5. ife: if/else statement
  6. whi: while loop
  7. vf: var function
  8. af: anonymous function
  9. nf: named function
  10. pf: property function
  11. iife: immediately invoked function expression
  12. mod: module
  13. args: arguments array
  14. tr: this reference
  15. con: console.log
var 1 = {2};
var 1 = [2];
var 1 = '2';
if (1) {
  2
}
if (1) {
  2
} else {
  3
}
while (1) {
  2
}
var 1 = function2() {
  3
};
function(1) {
  2
}3
function 1(2) {
  3
}4
1: function(2) {
  3
}4
(function(1) {
  2
})(3);
!function() {
  'use strict';

  1
}();
var args = Array.prototype.slice.apply(arguments);
var _this = this;
console.log(1);