Sorry for the dense question.
When creating a new project I would like the following line to be auto added to my platformio.io file:
How do I do that?
PS: i have searched the docs but found them confusing
platformio init command doesn’t provide this functionality. You can create alias of this command with
echo "......" > platformio.ini snippet.
thank you for the reply.
being dense again…
echo “…” > platformio.ini snippet.
do you mean just make a regular snippet and manually enter it?
thank you again.
What is your OS? See Aliases
Mac. thanks for the link, that’ll take a while to penetrate my skull.
I mean to add to
> alias pioforarduino='pio init && echo \\n"[platformio]"\\n"src_dir=."\\n"lib_dir=~/Documents/Arduino/Libraries"\\n >> platformio.ini'
and then call
thank you again, but it’s not working, it’s something I’m doing wrong for sure.
i just made a snippet and will just fill it in manually.
sorry for wasting your time, your help is appreciated though.
since you asked, and this is going to open a can of worms, and i’m having a hard time putting together the pieces to explain
first thing is when do i run the alias i get this out out from the console
he current working directory /Users/rgilmore will be used for project.
You can specify another project directory via
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.
The next files/directories will be created in /Users/rgilmore
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
src - Put your source files here
lib - Put here project specific (private) libraries
Do you want to continue? [y/N]:
When I answer “yes” and open the file to check the output it looks like this in the platformio.ino file in root.
there is more i could go on with but I’m not sure if it’s relevant yet.
thanks again, so glad i donated cause you guys are awesome!
Sorry, need to place double quotes. See updated comment.
Thanks a lot!
ok, now the entries are in the global platformio.ini correctly.
When I start a new project should those directories be showing up in the local project’s platformio.ini?
sorry, i was in the middle of editing that post
Off-top question: Why do you need it? Why don’t use PlatformIO Library Manager?
Some of my libraries aren’t in there.
ok, i’ll look into that avenue.
thank you again.