Noob question: Documents directory

I created my first project in PlatformIO, and it all looks pretty swish. First thing I wanted to do which I couldn’t find with a bit of a google is to change it so my projects get set up in a path of my choosing, rather than $HOME/Documents/PlatformIO/Projects/ This default is all wrong for my setup, but I couldn’t find an obvious way of changing it.

Mouse

The real short answer to your question is “it really doesn’t matter”. I just create a directory where I want the project to live…open up the folder in your ide (vscode or atom)…open up the pio console and do “pio init --board uno”. Close then open your ide…and you are done.

When I import project they end up in this directory though, and I don’t want that. I can shut atom down after the import, move the folder and then re-open it, but I have scores of projects, and this is a real pain for me. I don’t want $HOME/Documents/… being created every time I open my editor. I messes up my directory hierarchy.

I thought I stumbed on an answer by editing the projectsDir value in ~/.platformio/homestate.json, but it reverted when I opened atom.

I should have mentioned this in my first reply… settings->core->project home for Atom

You need Redirecting...

1 Like

Thank you very much, this was exactly what I was looking for!

I actually found a reference to this setting in a blogpost somewhere, but when I tried to set it from the terminal it complained that it wasn’t a valid setting or something… now it seems to be magically working. Is this a new setting which has just recently been pushed out over updates? (it’s very possible I just wasn’t doing it right before, and just don’t remember the details).

Anyhow, thanks again!

Yes, we added this setting in PIO Core 3.5. See Redirecting...

PIO Core 3.5 is planned for release this month.