0

I prefer writing code in Vim, so I'd like to get a workflow going with the Arduino CLI. I used to use ino, but I didn't like the restructuring of the project, which meant anyone who downloaded the code having to use ino.

I can build and verify using /Applications/Arduino.app/Contents/MacOS/Arduino --verify MyProject.ino, which pops up a new instance of the Java IDE, then exits after verifying.

While this works, and works well, it's incredibly slow. Is there any way to keep the IDE open to save the few seconds lost from the IDE starting again?

1 Answer 1

2

Is there any way to prevent Arduino CLI from closing each time?

I would suggest working the other way around.

  1. Start the Arduino IDE and set external editor in the Preferences (once).
  2. Open the sketch file(s) in the Arduino IDE and VIM.
  3. Edit the sketch file(s) in VIM.
  4. Move to the Arduino IDE and Verify, Upload, Monitor, etc.
  5. Repeat steps 3-4.

The alternative is to use a make based build system. An example may be found in the Cosa build system for Linux.

Cheers!

PS: VIM = any external editor such as GNU Emacs, TextEdit, etc.

1
  • I had no idea about the external editor! That would work for now. A Makefile would be the way to go when I have more time to look into it!
    – squarefrog
    Commented Aug 21, 2016 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.