Autocompletion for ES2015 imports! OMG!

Eran Schoellhorn
Aug 24, 2017 · 4 min read
In ES2015, we find ourselves writing this type of thing an insane amount of times throughout each day.

The Problem

The Tip

The Result

Hooray!

Final Thoughts


<template name="imp" value="import { $NAME$ } from '$PACKAGE$';" description="ES2015 Import  - With reverse completion" toReformat="false" toShortenFQNames="true">
<variable name="PACKAGE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_SCRIPT" value="true" />
</context>
</template>
<template name="impd" value="import $NAME$ from '$PACKAGE$';" description="ES2015 Import - With reverse completion" toReformat="false" toShortenFQNames="true">
<variable name="PACKAGE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_SCRIPT" value="true" />
</context>
</template>

ThreeFiveTwo

352 Inc Design and Engineering Blog

Eran Schoellhorn

Written by

Occasional JavaScripter

ThreeFiveTwo

352 Inc Design and Engineering Blog