Specify certain files to open on startup


#1

Is there a way to specify a certain set of files to open at startup somewhere ?

My requirement is I need to be able to tell Atom to open lets say abc.js , pqr.html etc. when it fires up and be able to change this as and when I feel like once Atom finishes loading or starting up.

I need the files to be opened in different tabs.

P.S. this is my first post on forums, if there is a way I overstepped please be easy on me :smile:


#2

Be easy on you?!?

But seriously …

I’m pretty sure there is a solution for how to edit your init.coffee tucked away somewhere in the forum. If not, does someone want to take a stab at it?


#3

I’m really curious what image you posted. It isn’t showing for me.


#4

I posted this one:


#5

Try adding the following to your init.coffee (File -> Open Your Init Script):

files = [
  "C:\\Users\\Philippe\\.atom\\config.cson"
  "C:\\Users\\Philippe\\.atom\\init.coffee"
]
atom.workspace.open file for file in files

To add your own files just place their paths in the files array.

Hint: it’s yellow and wears dungarees.
Edit: Boo. I am too slow.


#6

I see it now. Very funny.