Need help with js-live-template?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

148 Stars 39 Forks MIT License 47 Commits 8 Opened issues


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

Services available


Need anything else?

Contributors list

Table of Contents

Join the chat at

  1. Description
  2. Documentation
  3. Installation


An extensive set of Javascript live templates for use in JetBrains IDEs. These live templates are based off of


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$) {
el Flow Control: else statement
else {
ife Flow Control: if else statement
if ($condition1$) {
} else {
ei Flow Control: else if statement
else if ($condition$) {
fl Flow Control: for loop
for (let $index$ = 0; $index$ < $iterable$.length; $index$++) {
fi Flow Control: for in loop
for (let $key$ in $source$) {
  if ($source$.hasOwnProperty($key$)) {
fo Flow Control: for of loop (ES6)
for (let $key$ of $source$) {
wl Flow Control: while loop
while ($condition$) {
tc Flow Control: try/catch
try {
} catch ($error$) {
tf Flow Control: try/finally
try {
} finally {
tcf Flow Control: try/catch/finally
try {
} catch ($error$) {
} finally {
f Functions: anonymous function
function ($arguments$) { $END$ }                
iife Functions: immediately-invoked function expression (IIFE)
(($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$) => {
gf Functions: generator function (ES6)
function* ($arguments$) {
gfn Functions: named generator function (ES6)
function* $name$ ($arguments$) {
fe Iterables: forEach loop (chainable)
$iterable$.forEach(($item$)) => {
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
find Iterables: ES6 find function (chainable)
$iterable$.find(($item$) => {
  // return true to find single item if it is in the collection
c Objects and classes: class (ES6)
class $name$ {
  constructor($arguments$) {
cex Objects and classes: child class (ES6 syntax)
class $name$ extends $base$ {
  constructor($arguments$) {
cf Objects and classes: class function (ES6 syntax)
$fn_name$($arguments$) {
kv Objects and classes: key/value pair
$key$: $value$                
m Objects and classes: method (ES6 syntax)
$method$($arguments$) {
set Objects and classes: setter (ES6 syntax)
set $property$($value$) {
proto Objects and classes: prototype method (chainable)
$class$.prototype.$method_name$ = function ($arguments$) {
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) => {
S Types: String
N Types: Number
O Types: Object
A Types: Array
D Types: Date
Rx Types: RegExp
tof Types: typeof comparison
typeof $source$ === '$type$';                
iof Types: instanceof comparison
$source$ instanceof $object$                
p Promises: new Promise (ES6)
new Promise((resolve, reject) => {
then Promises: Promise.then (chainable)
$promise$.then(($value$) => {
catch Promises: Promise.catch (chainable)
$promise$.catch(($err$) => {
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$', () => {
ita BDD testing (Mocha, Jasmine, etc.): asynchronous "it"
it('$description$', (done) => {
bef BDD testing (Mocha, Jasmine, etc.): before
before(() => {
befe BDD testing (Mocha, Jasmine, etc.): before each
beforeEach(() => {
after BDD testing (Mocha, Jasmine, etc.): after
after(() => {
afte BDD testing (Mocha, Jasmine, etc.): after each
afterEach(() => {
cl Console: console.log
console.log('$title$', $value$);                
cll Console: console.log (text only)
ce Console: console.error
cw Console: console.error
st Timers: setTimeout
setTimeout(() => {
}, $delay$);                
si Timers: setInterval
setInterval(() => {
}, $delay$);                
sim Timers: setInterval
setImmediate(() => {
ae DOM specifics: addEventListener
$document$.addEventListener('$event$', function(e) {
gi DOM specifics: getElementById
gc DOM specifics: getElementByClassName
gt DOM specifics: getElementByClassName
qs DOM specifics: querySelector
qsa DOM specifics: querySelectorAll
cb Node.js specifics: Node.js style callback
(error, $value$) => { $END$ }                
re Node.js specifics: require a 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$) => {
us Miscellaneous: use strict
'use strict';                
fn Functions: named function
function $name$($arguments$) {



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


inside of the following directory:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.