All Projects → blakedietz → Js Live Template

blakedietz / Js Live Template

Licence: mit
An extensive set of javascript live templates for use with JetBrains IDEs.

Projects that are alternatives of or similar to Js Live Template

Unitylibrary
📚 Library of all kind of scripts, snippets & shaders for Unity
Stars: ✭ 1,968 (+1295.74%)
Mutual labels:  snippets
Foundationextension
Foundation/Cocoa/UIKit extension kit. Reference document:
Stars: ✭ 115 (-18.44%)
Mutual labels:  snippets
Coddx Alpha
Coddx - a collection of tools that help developers program efficiently. One of the features is generating multiple files from templates quickly.
Stars: ✭ 132 (-6.38%)
Mutual labels:  snippets
Rose
Simple PHP search engine that supports Russian and English morphology
Stars: ✭ 111 (-21.28%)
Mutual labels:  snippets
Vscode Matlab
MATLAB support for Visual Studio Code
Stars: ✭ 114 (-19.15%)
Mutual labels:  snippets
Kubectl Sheetcheat
The Definitive Kubectl Sheetcheat. ⭐ Give it a star if you like it. Work (always) in progress !
Stars: ✭ 119 (-15.6%)
Mutual labels:  snippets
Regex Snippets
Organized list of useful RegEx snippets
Stars: ✭ 109 (-22.7%)
Mutual labels:  snippets
Rocketseat Vscode Reactjs Snippets
Rocketseat ReactJS snippets for Visual Studio Code Editor
Stars: ✭ 136 (-3.55%)
Mutual labels:  snippets
Silicon
Create beautiful image of your source code.
Stars: ✭ 1,761 (+1148.94%)
Mutual labels:  snippets
The Way
A command line code snippets manager
Stars: ✭ 132 (-6.38%)
Mutual labels:  snippets
Embedme
Utility for embedding code snippets into markdown documents
Stars: ✭ 113 (-19.86%)
Mutual labels:  snippets
Custom Calendar View
The CustomCalendarView provides an easy and customizable calendar to create a Calendar. It dispaly the days of a month in a grid layout and allows to navigate between months
Stars: ✭ 113 (-19.86%)
Mutual labels:  snippets
Refills
Refills is maintained by the thoughtbot design team. It is funded by thoughtbot, inc. and the names and logos for thoughtbot are trademarks of thoughtbot, inc.
Stars: ✭ 1,523 (+980.14%)
Mutual labels:  snippets
Laravel 5 Snippets
Laravel 5 Snippets for Sublime Text
Stars: ✭ 110 (-21.99%)
Mutual labels:  snippets
Solang
First fully featured programming language for Stack Overflow Driven Development
Stars: ✭ 133 (-5.67%)
Mutual labels:  snippets
Lh Cpp
C&C++ ftplugins suite for Vim
Stars: ✭ 108 (-23.4%)
Mutual labels:  snippets
Borg
Search and save shell snippets without leaving your terminal
Stars: ✭ 1,528 (+983.69%)
Mutual labels:  snippets
Code Snippets
Chrome DevTools code snippets
Stars: ✭ 1,741 (+1134.75%)
Mutual labels:  snippets
Beginners C Program Examples
Simple, Short and Sweet beginners friendly C language programs
Stars: ✭ 138 (-2.13%)
Mutual labels:  snippets
Masscode
A free and open source code snippets manager for developers.
Stars: ✭ 1,878 (+1231.91%)
Mutual labels:  snippets

Table of Contents

Join the chat at https://gitter.im/js-live-template/Lobby

  1. Description
  2. Documentation
  3. Installation

Description

An extensive set of Javascript live templates for use in JetBrains IDEs. These live templates are based off of https://atom.io/packages/es6-javascript.

Documentation

Live Template Short Hand Description Template
v Declarations: var statement
var $name$;                
ve Declarations: var assignment
var $name$ = $value$;                
l Declarations: let statement
let $name$;                
le Declarations: let assignment
let $name$ = $value$;                
co Declarations: const statement
const $name$;                
coe Declarations: const assignment
const $name$ = $value$                
cos Declarations: const symbol
const $name$ = Symbol('$name$');                
if Flow Control: if statement
if ($condition$) {
  $END$
}                
el Flow Control: else statement
else {
  $END$
}                
ife Flow Control: if else statement
if ($condition1$) {
  $then1$
} else {
  $then2$
}                
ei Flow Control: else if statement
else if ($condition$) {
  $end$
}                
fl Flow Control: for loop
for (let $index$ = 0; $index$ < $iterable$.length; $index$++) {
  $END$
}                
fi Flow Control: for in loop
for (let $key$ in $source$) {
  if ($source$.hasOwnProperty($key$)) {
    $END$ 
  }
}                
fo Flow Control: for of loop (ES6)
for (let $key$ of $source$) {
  $END$
}                
wl Flow Control: while loop
while ($condition$) {
  $END$
}                
tc Flow Control: try/catch
try {
  $try_body$
} catch ($error$) {
  $catch_body$
}                
tf Flow Control: try/finally
try {
  $try_body$
} finally {
  $finally_body$
}                
tcf Flow Control: try/catch/finally
try {
  $try_body$
} catch ($error$) {
  $catch_body$
} finally {
  $finally_body$
}                
f Functions: anonymous function
function ($arguments$) { $END$ }                
iife Functions: immediately-invoked function expression (IIFE)
(($arguments$) => {
  $function_body$
})($passed_arguments$);                
fa Functions: function apply
$fn$.apply($context$, $arguments$);                
fc Functions: function call
$fn$.call($context$, $arguments$);                
fb Functions: function bind
$fn$.bind($context$, $arguments$);                
af Functions: arrow function (ES6)
($arguments$) => $statement$                
afb Functions: arrow function with body (ES6)
($arguments$) => {
  $END$
}                
gf Functions: generator function (ES6)
function* ($arguments$) {
  $END$
}                
gfn Functions: named generator function (ES6)
function* $name$ ($arguments$) {
  $END$
}                
fe Iterables: forEach loop (chainable)
$iterable$.forEach(($item$)) => {
  $END$
});                
map Iterables: map function (chainable)
$iterable$.map(($item$)) => {
  return $END$
});                
reduce Iterables: reduce function (chainable)
$iterable$.reduce(($previous$, $current$) => {
  return $body$
}, $initial$);                
filter Iterables: filter function (chainable)
$iterable$.filter(($item$) => {
  // return true to remove item from collection
  $END$
});                
find Iterables: ES6 find function (chainable)
$iterable$.find(($item$) => {
  // return true to find single item if it is in the collection
  $END$
});                
c Objects and classes: class (ES6)
class $name$ {
  constructor($arguments$) {
    $END$
  }
}                
cex Objects and classes: child class (ES6 syntax)
class $name$ extends $base$ {
  constructor($arguments$) {
    super($arguments$);
    $END$
  }
}                
cf Objects and classes: class function (ES6 syntax)
$fn_name$($arguments$) {
  $END$
}                
kv Objects and classes: key/value pair
$key$: $value$                
m Objects and classes: method (ES6 syntax)
$method$($arguments$) {
  $END$
}                
set Objects and classes: setter (ES6 syntax)
set $property$($value$) {
  $END$
}                
proto Objects and classes: prototype method (chainable)
$class$.prototype.$method_name$ = function ($arguments$) {
  $END$
};                
r Returning values: return
return $value$;                
rth Returning values: return this
return this;                
rn Returning values: return null
return null;                
rt Returning values: return true
return true;                
rf Returning values: return false
return false;                
r0 Returning values: return 0
return 0;                
r-1 Returning values: return -1
return -1;                
rp Returning values: return Promise (ES6)
return new Promise((resolve, reject) => {
  $END$
});                
S Types: String
String                
N Types: Number
Number                
O Types: Object
Object                
A Types: Array
Array                
D Types: Date
Date                
Rx Types: RegExp
RegExp                
tof Types: typeof comparison
typeof $source$ === '$type$';                
iof Types: instanceof comparison
$source$ instanceof $object$                
p Promises: new Promise (ES6)
new Promise((resolve, reject) => {
  $END$
});                
then Promises: Promise.then (chainable)
$promise$.then(($value$) => {
  $END$
});                
catch Promises: Promise.catch (chainable)
$promise$.catch(($err$) => {
  $END$
});                
ex ES6 modules: module export
export $member$;                
import ES6 modules: module import
import $END$ from '$module$';                
ima ES6 modules: module import as
import $exposed$ as $name$ from '$module$';                
imn ES6 modules: named module export
import { $name$ } from '$module$';                
desc BDD testing (Mocha, Jasmine, etc.): describe
describe('$description$', () => {
  $END$
});                
ita BDD testing (Mocha, Jasmine, etc.): asynchronous "it"
it('$description$', (done) => {
  $END$
});                
bef BDD testing (Mocha, Jasmine, etc.): before
before(() => {
  $END$
});                
befe BDD testing (Mocha, Jasmine, etc.): before each
beforeEach(() => {
  $END$
});                
after BDD testing (Mocha, Jasmine, etc.): after
after(() => {
  $END$
});                
afte BDD testing (Mocha, Jasmine, etc.): after each
afterEach(() => {
  $END$
});                
cl Console: console.log
console.log('$title$', $value$);                
cll Console: console.log (text only)
console.log($END$);                
ce Console: console.error
console.error($END$);                
cw Console: console.error
console.warn($END$);                
st Timers: setTimeout
setTimeout(() => {
  $END$
}, $delay$);                
si Timers: setInterval
setInterval(() => {
  $END$
}, $delay$);                
sim Timers: setInterval
setImmediate(() => {
  $END$
});                
ae DOM specifics: addEventListener
$document$.addEventListener('$event$', function(e) {
  $END$
});                
gi DOM specifics: getElementById
$document$.getElementById('$id$');                
gc DOM specifics: getElementByClassName
Array.from($document$).getElementsByClassName('$class$');                
gt DOM specifics: getElementByClassName
Array.from($document$).getElementsByTagName('$class$');                
qs DOM specifics: querySelector
$document$.querySelector('$selector$');                
qsa DOM specifics: querySelectorAll
$document$.querySelectorAll('$selector$');                
cb Node.js specifics: Node.js style callback
(error, $value$) => { $END$ }                
re Node.js specifics: require a module
require('$module$');                
em Node.js specifics: export member
exports.$name$ = $value$;                
me Node.js specifics: module.exports
module.exports = $name$;                
on Node.js specifics: attach an event handler (chainable)
$emitter$.on('$event$', $arguments$) => {
  $END$
});                
us Miscellaneous: use strict
'use strict';                
fn Functions: named function
function $name$($arguments$) {
  $END$
}                

Installation

macOS

There are two ways to install:

Using settings.jar

  1. File > Import Settings
  2. Select the settings.jar file
  3. Check Live templates in the Select Components to Import dialog
  4. Click ok in the Select Components to Import dialog
  5. Click ok when prompted to restart

Copying es6.xml

Put es6.xml inside of the following directory:

~/Library/Preferences/<intellij-product-install>/templates
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].