I have always preferred developing in Sublime Text especially for Arduino Projects since the syntax highlighting is better than doing it in Arduino IDE. Unfortunately, it is annoying to keep opening .ino files on Sublime Text then set the syntax highlighting to C++ (.cpp) on each file.
Luckily, there is a way to do this automatically so that whenever I open a .ino file it will always open with a C++ syntax highlighting in Sublime Text. Below are the steps on how I did it.
Note: My Sublime Text is configured to use the Color Scheme named Sixteen.
1. Open a .ino file in Sublime Text
In my case I created an Arduino Sketch, saved it then opened it in Sublime Text.
By default it will be opened as a Plain Text.
2. Associate the Arduino file (.ino) as a C++ file (.cpp) in Sublime Text
Go to View >> Syntax >> Open all with current extension as… >> C++.
Once you have selected C++ the window would then convert the syntax highlighting to C++.
Now whenever you open an Arduino File (.ino) in Sublime Text it will always open with a C++ Syntax Highlighting.
9 thoughts on “Setting Arduino .ino files to open as C++ files in Sublime Text”
But how to compile and upload itm or set upload parameters?
Hey Shariq, I’m not sure if it can be done in Sublime Text but what I do is I do the compilation and board settings on the Arduino IDE.
Search about DEVIOT.
Woah! It’s my first time hearing this. Really cool! With this we can upload code to Arduino directly from the Sublime Text IDE. Thank you very much for this!
Thanks a lot, that was very helpful 🙂
You are welcome Alex! ^_^
So nice, thank you!
Thanks a lot!!
Thanks mate! Very helpful!