Skip to content

Instantly share code, notes, and snippets.

@cassioscabral
Last active August 29, 2015 14:05
Show Gist options
  • Save cassioscabral/c100e89171751251ab2d to your computer and use it in GitHub Desktop.
Save cassioscabral/c100e89171751251ab2d to your computer and use it in GitHub Desktop.
Meteor Live Templates for Webstorm

As suggested in this question(that I asked) on SO. You can use some functions to create live templates on Webstorm(JetBrains IDEs).

Here I am adding my own live templates(calling snippet for short):

For creating templates:

Type: temp Add to: HTML

Expressions($VARIABLE$ : EXPRESSION):

$FILE_TO_CAMELCASE$ : underscoresToCamelCase(fileNameWithoutExtension())
$FILE$ : fileName()

What I get:

<template name="myTemplate">
   my_template.html
</template>

Snippet:

<template name="$FILE_TO_CAMELCASE$">
  $FILE$
</template>

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