3

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)';

1 Answer 1

3

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

Here is the issue.

Sign up to request clarification or add additional context in comments.

2 Comments

I was hoping to be able to use some lodash or underscore to make this possible. I'm gonna look more into Atom code to see if I can manage monkey patch or something then. Thanks
Good idea :) Even better : you can try to get in touch with the community thanks to the link I posted before, and contribute to this enhancement. Anyway, give us some feedback here, I think a lot of us are waiting for this feature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.