Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

No information about how to use init.coffee #26

Closed
russlescai opened this issue Mar 19, 2015 · 9 comments
Closed

No information about how to use init.coffee #26

russlescai opened this issue Mar 19, 2015 · 9 comments

Comments

@russlescai
Copy link

I have been trying to use init.coffee, but couldn't find any information anywhere on how to use it.

This could be a useful addition to the flight manual.

@Trudko
Copy link

Trudko commented Mar 19, 2015

I am happy to take a look at it during the weekend. I can at least start it :)

@nathansobo
Copy link
Contributor

Feel free to post any questions here as you work on that section.

@izuzak
Copy link
Contributor

izuzak commented Mar 19, 2015

Note: there's a start of such a section, but it seems it's not finished and not included in the book (I'm guessing that happens when you use xx- as the prefix of the section?):

https://github.com/atom/docs/blob/master/book/03-hacking-atom/sections/xx-init-file.asc

@schacon
Copy link
Contributor

schacon commented Mar 20, 2015

Yeah, this is a small part of what was in the old guides but I couldn't find a good point for it in the new docs. This is mostly because I couldn't find a great reason to use it - like a real example of what someone might put in there. I was thinking of putting it at the end of the chapter, using some of what we've learned to show what might go into a file like this.

@Trudko or @russlescai could you share some of what you put in your init.coffee file? Perhaps we can turn something there into a real example. And @izuzak is right, the start of the file is already there, it just isn't included in the build yet because it doesn't quite fit. It shows an example of beeping when Atom loads, which seems a bit silly to me. I would rather have a real example of something useful.

@russlescai
Copy link
Author

I was thinking of adding a command to run a process. I assumed it was usually to add a command to add a trivial piece of code.

in this case I was going to add a command to read the contents of the current editor or open the file in sql management studio.

Not really reusable enough for a package, but scratches a particular itch.

@izuzak
Copy link
Contributor

izuzak commented Mar 20, 2015

@Trudko
Copy link

Trudko commented Mar 28, 2015

@schacon fair point. I already asked this questions my self here you can see some answers Share your init.coffee.

Personally I use it for something which is specific to my workflow but too small for creating whole package. For example I've created small custom command which opens test fixtures for class . I might created package so others could use it, but it would require extra effort to generalize it for others too.

@izuzak
Copy link
Contributor

izuzak commented May 31, 2015

#65 brought back the section on init.coffee and added a more realistic example.

@izuzak izuzak closed this as completed May 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants