Cassio Cabral
Cassio Cabral

Reputation: 2682

How to add or use functions on Atom snippets?

I want to know if it is possible to create or call functions to use on snippets in the Atom editor. If possible, how do I do it ? Maybe using lodash or something similar ?

I want to use something like uppercase(), downcase(), filePath().

My problem is that I want to generate something like this line below:

import Hello from 'components/atoms/hello/Hello';

My snippet would be something like this:

import $1 from 'components/atoms/downcase($1)/$1';

Or:

import camelCase($1) from 'components/atoms/$1/camelCase($1)';

Upvotes: 3

Views: 459

Answers (1)

noelm
noelm

Reputation: 1302

This behavior is still an opened issue. So it's seems there is no solution right now for this, sorry.

Here is the issue.

Upvotes: 3

Related Questions