Skip to content

Instantly share code, notes, and snippets.

@azproduction
Last active August 29, 2015 14:11
Show Gist options
  • Save azproduction/7caf7a0ef20b98660162 to your computer and use it in GitHub Desktop.
Save azproduction/7caf7a0ef20b98660162 to your computer and use it in GitHub Desktop.
WebStorm Live Templates
console.log($LINE$);
// LINE = lineNumber()
console.log('$FUNCTION$@$FILE$:$LINE$');$END$
// FUNCTION = jsMethodName()
// FILE = fileNameWithoutExtension()
// LINE = lineNumber()
console.log(JSON.stringify($END$, null, 4));
// Debug tool. Copy variable name then type `cw` -> `console.log('variable=', variable);`
console.log('$CLIPBOARD$=', $CLIPBOARD$);$END$
// CLIPBOARD = clipboard()
define(function(require) {
$END$
});
function $END$() {
}
function () {
$END$
}
@import 'global-variables.less';
.$BLOCK$ {
@block: ~'.$BLOCK$';
$END$
}
// Twitter Flight specific component template
define(function(require) {
require('css!./$COMPONENT_NAME$.css');
var template = require('text!./$COMPONENT_NAME$.html');
var defineComponent = require('defineComponent');
function Component() {
this.defaultAttrs({
});
this.after('initialize', function() {
this.$node.html(template);
$END$
});
}
return defineComponent(Component);
});
$MODULE$ = require('$MODULE$')
return $END$;
var that = this;
@rsboarder
Copy link

$constructor$.prototype.$methodName$ = function() {
    $END$
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment