Use Sublime Text as an Arduino IDE replacement.

Yikes - Post #3,999. I got feedback on Stino Issue noted above:

Defragster commented 8 hours ago
Even with just a single copy of Sublime open doing 'Arduino / Install Platform / Add Arduino IDE' setting is lost on Sublime restart?
Other JSON based boards are remembered - but to get to Teensy I have to Re-Add at least 4 times.
Also doesn't seem to restore the board I last used on that Platform on coming back.

Is this expected to work with multiple copies of Sublime open perhaps to different Boards/Platforms? It seems to revert to primary Console window and seemed confused.

Robot-Will commented an hour ago
I found a error and it causes the setting does not work, and I fixed it.
Work with multiple copies of Sublime open perhaps to different Boards/Platforms? No.

<edit> Sublime working so well I paid for a license! Working well with Stino. I put in two more issues. There is a Sublime setting " Tools / Save All on Build " that he is going to add a setting for. The other was "Arduino / Auto Format" worked well except it took a "<=" to "< =" - and the added space broke the build.

<edit 2> Also found it doesn't save before Auto Format, but formats the disk image - fix will be coming. Latest Stino has a Save before Build option working.

Being new to Sublime I wasn't sure how to update the keymaps for Stino commands and got this reply that makes Sublime feel more comfortable:
Robot-Will commented
Shortcuts is a big problem to satisfied all users around the world with different keyboards. So currently no shortcuts are defined. You can define your own shortcuts by your self.
Open Setting File
Menu - Preferences - Package Settings - Stino - Key Bindings
Edit the file.
In Main.sublime-menu you can find all commands. Build is stino_build, upload is stino_upload. Then write the Key bindings as SublimeText documents.
Save.

I made these changes to the blank Key Bindings file that came up:
Code:
[
{ "keys": ["ctrl+u"], "command": "stino_upload" },
{ "keys": ["ctrl+t"], "command": "stino_auto_format" }
]

This is working great with Teensy (and TyCommander) - Thanks Kurt!
 
Last edited:
Stino is being actively updated and improved - it now will save settings per sketch for a given board. And errors in compile window are linked with a click to the source file where the line is centered and the error text is presented highlighted inline below the source line. This is a WIP - but the past 3 hours I have found and seen corrected behavior I reported with these features.

SublimeText is a great editor and these changes alone make it an improvement over the IDE! Using TyCommander for uploading and Serial Monitor is just like in the IDE so that other great tool is supported as well.
 
Yes - He is actively working on it which is great. I have had a few times when things either stopped working and/or minor issues, but he has fixes or improvements for usually within a day.

So I am very happy with it. Also I made a suggestion to maybe be able to setup to have Stino do a copy of the binary to some remote machine (like pscp) and/or maybe be able to run a command on the remote machine.... So hopefully he will have a nice solution to be able to program a Teensy plugged into RPI from your PC... :D
 
Stino2017 branch now merged into Stino-Dev branch, which I am using... I am about to copy in the latest stuff in from yesterday/today's changes.
 
I should have noted that BRANCH change to Stino-Dev as I had to move to get the latest.

I just closed my open issue!

I can open T_3.6 and another STM32 board sketch and go between them edit and upload and it uses the saved board settings for each, does a minimal build ( even across closing of Sublime )

I did just make an issue that Auto Reformat is lost switching between the two - so there may be minor issues to find/resolve.
 
Point of reference:: Above post at 9:36 : This post at 10:23 and the code fix has been made and posted on Github 6 minutes ago. I have not tested yet, but after making the issue - I then got a request for the source file involved. So there was some back and forth and investigation and fix - all within an hour ... it was a one line change.
 
One thing I am trying to figure out now on my new machine is: I have installed Arduino onto my Hard drive d: and not the solid state drive...

Which works fine, BUT Arduino still wants all of the optional install hardware, like DUE, like Adafruit, like Intel Edison installs (board manager)
it appears to be hard coded to: C:\Users\kurte\AppData\Local\Arduino15
So far I have not found any setting to allow me to move the package/staging... to some other location?
A quick follow up here...

Currently I am trying a work around for this. What I did was to move all of the stuff from:
C:\Users\kurte\AppData\Local\Arduino15 to D:\Users\kurte\AppData\Local\Arduino15

I then opened a Command Prompt (admin) window and did a command:
mklink /D C:\Users\kurte\AppData\Local\Arduino15 D:\Users\kurte\AppData\Local\Arduino15

I think I got the order correct may be the other way around...

So now when Arduino tries to write to my C drive it is now writing to my D drive... So far appears to be working (keeping fingers crosses)
 
Paul: how will these changes coming in Arduino 1.9 affect the Teensy(loader) environment?

Good question. I heard their new beta only ~8 hours ago. The preprocessor is probably the biggest change, and I for one will be glad when we can finally be rid of the horrific ctags parser.

As a quick sanity check, I grabbed the beta source from github just now. The Teensyduino java changes still patch cleanly. That's no substitute for real testing, but a pretty good sign they're (so far) not changing stuff that matters for Teensy.

I'll probably put a few good hours into really testing it sometime next week. If there's interest, I'll probably make a special installer or post a patched copy.
 
By then using Arduino builder this should allow anyone to use almost any IDE to program an Arduino, correct?

This part isn't new. They switched from Java running the gcc to arduino-builder in version 1.6.6 in November 2015. That's the reason I keep support for 1.6.5-r5 in the installer, for anyone who wants to try building with the old Java-only IDE.

Even though arduino-builder reads platform.txt and boards.txt, it's a far cry from a highly flexible build system like make or ant. It also has a tremendous amount of the Arduino IDE's logic. So while it could be said anyone could make a 3rd party IDE, using arduino-builder means you'd be committed to many Arduino's design choices. Then again, hundreds of widely used libraries and thousands of others seldom used, and countless user "sketch" programs have subtle dependencies on some of those choices.
 
I downloaded 1.9 and played around with the code complete and it's still kind of rough. On MacOS when first using code complete (control + space) I guess it has to load up bunch of stuff and locked up my computer for a few minutes though once it gets loaded it works ok I guess, didn't really delve to much into it yet.
 
I downloaded 1.9 and played around with the code complete and it's still kind of rough. On MacOS when first using code complete (control + space) I guess it has to load up bunch of stuff and locked up my computer for a few minutes though once it gets loaded it works ok I guess, didn't really delve to much into it yet.
There's a disclaimer about that in their announcement.

Initial support for autocompletion (activate it using CTRL+space)

Attention: Launching for the first time is quite slow and will freeze the UI. Don’t worry, simply wait for it to unstick.
 
I've played with Stino plugin for Sublime Text 3 and managed to build and upload one of the Teensy examples, all within the editor. Then I changed something minor in my setup and now the plugin hangs at the build stage (triggered by a cryptic python exception if you open the ST3 console). It is very unfortunate since ST3 is a fairly polished and fast cross-platform editor.

If "someone" seriously cleans the Stino plugin and another "someone" makes a Tortoise-like GUI Git plugin for ST3 in Linux (I use ST3 TorotoiseGIT Context Integration plugin in W10) then I promise to pay/donate for the two plugins and switch to Linux. Sorry for wishful thinking :)

Anyway I am inclined to switch to ST3 as my main editor and buy a license.
 
Note: These days I still use ST3 as my main editor... Use Arduino IDE for simple edits for sketch.

The main reasons I stopped using Stino was that the build process was not identical to Arduino so somethings would not properly compile. Example is which copy of a library would be used when you have multiple copies. Stino for example did not look fully at the library properties to see if a library had a compatible architecture.

But the real main reason I stopped using Stino is how it eat up way to many resources and crash. It is like Stino keeps an open file handle for every one of the files in your project, plus to every library file it finds... And it does this for each ST3 main window you open. So then hits some limits, and things in ST3 stop working. Menus don't open, or Strings in menu become garbage or ... And then crash...

And then the developer Robot-Will disappeared. Has not been any changes/comments/... Since last April.
 
I realized quickly that Stino is (unfortunately) not quite ready.

My second and critical problem is how to replace a very polished Tortoise GIT that I used for years and that easily integrates in most W-editors. It is available for W only. The ST3 plugin on W works on any directory, sub-directory or individual file in the left ST3 panel just by the right clicking the object in the left ST3 panel. Every other Linux ST3 plugin is either extension of a command line GIT UI, or works on individual files only.
 
On windows and MAC I just use the Github Desktop setup, which is alright for me.

Within SublimeText I use I think it is called, SublimeMerge, which allows me to compare files a few different ways. Can compare from one open windows contents to another... Which I often use to compare my changes versus the current stuff. Or for example to compare something like my ili9341_t3n to the current ili9341_t3 to see what changes I have done.

It also has the ability to compare the current buffer to revisions on github. So I can check there for changes and for example back out some of the changes. I believe this works on Windows, Linux and MAC

But for Git on Linux, I usually try to just use the command line stuff, but sometimes will use gitgui or the like.
 
I've been using SublimeMerge for few days already and it is quite good, and it can be configured. Not quite as comfortable to me as W "Compare It!", mostly because I got accustomed to it for nearly two decades. But there is nothing even close to Tortoise VCS (ease of use, completeness, integration) on Linux, and I've searched hard. I will learn the basics of the command line GIT or some command line derived ST3 plugin, but it is a bit frustrating....

I rarely use Github, mostly working locally. I have a FreeNAS server that holds the GIT bares for my projects, so I can push/pull the working project between different laptops and the main development desktop.
 
I still normally do most of my development using Windows 10. I am just more familiar and comfortable with it...

But I am currently playing with a new ROS robot (Turtlebot3 Waffle pi), so I do now have a machine that I run mainly Ubuntu on as that is more inline with ROS. A couple of years ago, I was trying to get more familiar with ROS and at that time i started off using Mint, which I liked better than straight Ubuntu, but at least at that time you had to do some trickery with ROS to get it to work. (Update some API to say my Ubuntu version is xxx)...

But at that time I was using another Merge program on Linux, I think was called: meld

I am actually very comfortable using ST3, but at times I wonder about maybe trying some other IDEs... My TB3 shipped with a new book ROS Robot Programming that was written by the developers of the TB3. In it they mentioned some different IDEs to maybe use that integrate well with ROS. Will also be interesting to see how well some of these work with Arduino.

Some of them include:

a) Eclipse - I used this awhile ago, especially when working with Intel Edison. - but big... slow to start....

b) QT Creator - This is what at least some of the developers of the book are using... I installed it have not played much yet with it.

c) Visual Studio Code - Did not know that there was a lighter weight Studio that ran on different platforms.

Many others like netbeans, emacs... Of these I mainly want to play some more with QT and VS...
 
Stino kept working for me until I stopped using it. I used it for some STM32 devices and Teensy.

ST3 is pretty nice. SublimeMerge wasn't the most fun. I'm Win 10 only - recently got linked to 'CodeCompare' from one of the public sites and it is decent to reading changes - has merge/remove/edit and other powers I didn't try yet. Allows comparing two folders and puts menu item in 'file explorer' so selecting two dirs and right click 'Compare with Code Compare' opens them up naturally - or can browse to fill the subject directories in the app.
 
I don't see ST3 as an IDE or even as a full-fledged development environment. The quality of plugins is rather uneven at the moment. But the editor core is fast, configurable, and looks nice on both L and W (zero experience with M), which is a big rarity in the cross-platform world.

I've used Eclipse quite a bit as part of the TI Code Composer and as a W IDE for the GNU native C++ toolchain. It is quite usable, but has way too many config options (you can spend weeks tuning it to perfection), and is a time-space hog (being written in Java).
 
Back
Top