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


I would suggest working the other way around. 


Start the Arduino IDE and set external editor in the Preferences (once).
Open the sketch file(s) in the Arduino IDE and VIM. 
Edit the sketch file(s) in VIM.
Move to the Arduino IDE and Verify, Upload, Monitor, etc.
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.