How start Atom without loading last files/projects? e.g. How delete storage/editor-* files on startup?


#1

How start Atom without loading last files/projects?

I’d like to always start Atom with a clean slate rather than with old laundry.

I think this can be done by erasing $HOME/.atom/storage/editor-* files.

Is there possibly a way to always run a shell command like
"rm $HOME/.atom/storage/editor-*" at startup or
is there a less hackish way to do the same?

Thanks!

Chris


#2

Settings > Open Empty Editor On Start


#3

Daniel

Thank you very much! It still starts out with the directory view on the left
from the last project (directory) opened. Is there a way to turn that off
when you start? I don’t want any residual state info to be present.

Thanks!


#4

Daniel

I thought something was amiss. That setting doesn’t do anything! I just
checked! If you quit Atom with a file still open it restarts with that file loaded.
I noticed there is an old thread about this being a bug. Seems
it hasn’t been fixed yet?

cs


#5

That setting does do something but only in the situation where Atom opens with no project. It determines whether Atom opens with an empty window or a window with an empty file in it. It is rare to start Atom with no project, though, so yes, the setting is somewhat misleading.

Regarding deleting the contents of ~/.atom/storage, we’re moving to a new system of storing the serialized state as part of the Crash Recovery functionality in v1.7-beta. This includes a --clear-window-state option for the atom executable that equates to the deletion of the contents of the ~/.atom/storage directory.


#6

Thanks! I tried the beta and that switch you mentioned works.

It still opens with the tree view of the old directory I was in before I exited
Atom last time.

Is there a switch to also NOT show the old tree and/or show a new unnamed
empty file as well?

Thanks again.

cs


#7

No, there currently isn’t anything like this. Fixing up all the various launch scenarios is something we have on the list:


#8

Should I wait for these features to show up on the settings menu
or should I make a custom package? Isn’t it the “Atom Way” to
do these sorts of customizations in packages anyway? How does
that sound?

One could make a package to remove project directories from tree view,
open new files, etc. easy right?

cs


#9

It depends on what you want exactly. You might look at the project manager packages that already exist.


#10

Most of non-settings customization is done in ~/.atom files like init.coffee.