Keyboard Karate that matches our mostly reasonable approach to JavaScript
Move the javascript
folder to ~/Library/Application Support/Sublime Text 2/Packages/User/
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.
- vo: var object
- va: var array
- vs: var string
- if: if statement
- ife: if/else statement
- whi: while loop
- vf: var function
- af: anonymous function
- nf: named function
- pf: property function
- iife: immediately invoked function expression
- mod: module
- args: arguments array
- tr:
this
reference - 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);