mix command for creating new file with module in existing project

Hi,

A complete beginner question, probably there is no such need :slight_smile:

I was playing with my first elixir app, then I decided to split my module into two files,
I don’t want to create a file by hand, don’t want to modify any mix file, I want to have the boiler plate code created by mix “new”. So my question is, how can I add a new file to my existing app via mix?

1 Like

You cannot, because that is not a job for Mix. Why you have such aversion to creating such file on your own? You can always configure your editor to handle boilerplate for you if you want. I have configured Vim to do so with ease, I believe that your editor also has such capabilities, and if not, then there is probably extension that will provide such functionality.

2 Likes

Out of curiosity. Are you willing to share that vim functionality? Would love to add that as well

1 Like

Thanks, I like the test code and the docstring templates that it provides,
I didn’t want to break the pattern by introducing files manually and
but correct, I guess I need to find a nice snippet plugin for my taste :slight_smile:

1 Like

It is available in the PR to the Elixir support plugin

@yetkin I still do not get what is the problem. What kind of docstrings? When you create new module then there is no functions, so there is no docstrings for anything.