Do I have to save the sketch before uploading through arduino-CLI?

Hi, Im have arduino-CLI with VIM text editor in a linux machine.

Its going well, although with the way im using it, I need to save the sketch before compiling and uploading.

is there a way to upload the code without saving changes in the real file?

For example the arduino IDE had the option to disable saving the file when uploadin, can this also work with CLI ?

Probably not… How would the command line read the updated code that could be anywhere in memory / text editor, possibly on a remote machine…

The IDE generates a copy of all the files needed in a temporary space so has access to the content of your unsaved modifications

1 Like

Understood :+1:

I ll search then if there is a simple way of creating a temp file with vim or something like that.

Thanks!!

What’s the issue with saving the file? You have the undo tree in VIM that is pretty powerful

Also you can explore Compiling code from vim - Unix & Linux Stack Exchange

Well... nothing heh I just saw that when I save in VIM I can also go back before the saving... didnt know that :face_with_hand_over_mouth:

Thanks for the link! I ll check that.

Have a nice day J M L :raised_back_of_hand:

:slight_smile:
Have fun

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.