Use Sublime Text as an Arduino IDE replacement.

Update:
Yeah that package worked fine. But I wanted to change the find text colors, etc. Now I remembered why I didn't warm up to Sublime. I cannot understand the logic and flow of the Packages it uses and how to modify a setting. I googled how to change the text color when searching but got lost in all the instructions. Sublime must be designed from a really old editor from Unix. There is a lot of typing going on to make changes. Well, I couldn't figure it out so I just gave up. It's really too complicated for us windows users, or at least for me. You have to be a Linux gear head that is used to working from the command line all the time. That's not me. I'm used to a dialog window showing me all the colors and letting me change it. Having to do this via packages is way too complex and I just don't understand the many steps needed or what package is needed.

But thanks for trying to help me. I'll have to stick to Visual Studio.
 
vsCode is doing this per default. You don't even have to search, just selecting a word will highlight all others.
 
vsCode is doing this per default. You don't even have to search, just selecting a word will highlight all others.

Yep - Sublime text more or less has this as well. Example I double clicked on a word and you can see the others are highlighted here as well.
screenshot.jpg

Likewise if I do a search you can say find all and it will show all of the matches. It will show all of them... But it does not keep them all highlighted.

Again as they say if you have an editor that does what you want great!. For a long time I just used Programmers Notepad, Or VS, but then went to working some of the time on Linux or Mac. Got tired of using VIM... For awhile used Text Wrangler on MAC...

For awhile was using Eclipse, with the Edison. It was also interesting, they had it setup to be able to do builds on the PC and have it download over the net to Edison, and then setup to do source level debugging.

As for Colors and changing: I just go through and try out the different color schemes found in the preferences menu until I find one I like... I am not too picky.

And yes there is the ability to do lots of strange configuration stuff with command lines and the like... But for the most part I ignore this. However I do a lot of network searches to remember how to do things. Like how to do regular expression search and replace, and all of the syntax... Or as I started off this last messages, how to get project to not go through the link...

At some point I may go to vscode or ???,
 
I have vsCode and yes it does highlight the word the cursor is on. However as soon as you move the cursor you lose all of the highlights. I need to highlight the word and then move around in the file and examine each highlighted word. VS lets me do that. Apparently sublime will too but you need a college degree to configure it. That leaves me out. I wish I could just double click on a word and have it do the search to keep the words all highlighted until I press esc. I haven’t found an editor that can do that
 
If you want it permanently highlighted you can search for it. Easiest is:

  • Double click on the word to select it.
  • CTRL+F opens the find dialog with the selection already filled in

Now all occurrences are highlighted until you close the search dialog. This also highlights the word in newly opened files..

Anmerkung 2020-08-20 000018.jpg
 
Yes I know it will do that but I don't like the non-color as the default. I wanted to make the highlights bright yellow (I'm an old fart) but that's when I saw how complicated (to me) it was to do that in sublime. I just gave up and I'll stick to using VS. I was able to configure the colors in VS without too much difficultly.
 
Hi all - as a software developer I use Sublime text on Windows as my main editor. Is it simple/worth it to get sublime integrated with Arduino, or should I keep doing what I have been doing: (1) Editing code in Sublime (2) Compile/upload from Arduino IDE. ? From reading back a few pages it seems like it's a bit of a process to get it all working from within Sublime?

I know this is an old thread, however, what I can recommend for teensy development when trying to use a sophisticated IDE is using platformio and leaving the Arduino IDE itself behind. It integrates nicely with many development systems like VS, CLion, Eclipse, Emacs, vim, qt creator etc. and supports the Arduino philosophy but also many others (mbed, stm32cube).

Info for Sublime integration is here: https://docs.platformio.org/en/latest/integration/ide/sublimetext.html

Once you get a knack for platformio it will open you the doors for more than 800 embedded boards.
 
For those using TSET to allow creation of a Compile.CMD to start a command line BUILD {using arduino builder and PJRC installed toolchain} like with SublimeText code editor - TSET is up to date and working here.

Notes:
> Just made an edit to use the PORTABLE libraries folder when it exists in the Arduino IDE folder declared in :: set arduino=T:\arduino-1.8.13_p54
- it should follow the IDE process of building with libraries in %arduino%\portable\sketchbook\libraries
> As before it works without TyCommander Integrated to use the PJRC Loader for Teensy programming, even if TyCommander is active as SerMon
> Works with TyCommnder Integration in the Arduino IDE so that TyCommander will program the indicated Teensy
 
Updated to new computer - managed the "T:" on old computer to the new - was a stand alone SSD - now mapped into T_DRIVE folder as T: so no changed needed for TyComm or TSET setup - even the IDE with TeensyDuino installed worked - and ran from existing Compile.cmd

New install of SublimeText ...

Went to github.com/Defragster/Tset and got SublimeText Build done creating indicated file indicated here from git link as "C:\Users\YourNameHere\AppData\Roaming\Sublime Text 3\Packages\User\Teensy.sublime-build"

and that post also linked to SublimeAStyleFormatter package install notes to install from sublime.
 
I need to see how much out of date my sync is to your version of tset...

Other things I keep meaning to look at and/or play more with include:

a) What about the SublimeText 4? I have the dev build on my machine but not sure if one can copy setting files over from SublimeText 3...

b) PlatformIO/Deviot (https://github.com/gepd/Deviot)
Deviot is a plugin inspired in stino, it's compatible with Sublime Text 3 and uses the PlatformIO ecosystem, which supports more than 450 boards.
 
Just updated Github and p#90 for TSET to track SKETCH NAME on Compile,cmd Build or NEW sketch - helps with Multiple INO's in a folder.

Have moved to Sublime 4.0 update and finding that 'F4' error/warning parsing is better/less annoying!

Currently use with IDE 1.8.15 and TeensyDuino 1.54 (beta 12) and of course TyCommander


Current Sublime Build Tools found in : C:\Users\{yourUser}\AppData\Roaming\{YOUR_Sublime Text}\Packages\User\Teensy.sublime-build
Code:
{
	"shell_cmd": ".\\Compile.cmd 1",
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "working_dir": "${file_path}",
    "selector": "source.c, source.c++",

	 "variants":
    [
     {
      "name": "Clean",
      "shell_cmd": ".\\Compile.cmd 2",
     },
     {
      "name": "New Sketch",
      "shell_cmd": "start T:\\Programs\\TSet\\open_new.cmd",
     },
     {
      "name": "Verify",
      "shell_cmd": ".\\Compile.cmd 0",
     },
     {
      "name": "Tools Set",
      "shell_cmd": "start T:\\Programs\\TSet\\TSet.cmd[B][U] $file_name[/U][/B]",
     }
   ]
}
 
Last edited:
Thanks @defragster - I synced up... :D

Cool - good luck!

I wondered why the name wasn't working - even on NEW that it was designed for ... then found missing $file_name param made a diff.

Given that stored name - build on file in that DIR knows what the target is.

And when put into 'S' Subdir - then Build when the subfolder Compile.cmd is open allows jumping between alternate MCU units nicely.
 
Hello,
Thanks for putting this together, defragster!

I was wondering if there was a way to turn off warning in the in line compiler errors.
Code:
"%arduino%\arduino-builder" -verbose=0 -warnings=none ...
Didn't change anything.
 
Always liked the verbose so never tried to change that.

If you have an active Arduino IDE install, the used command line comes from the console using that.

Build a sketch with IDE verbose settings and find the relevant 'arduino-builder' line in the console output.

Then do the same build after changing the verbose option to 'no' in the IDE and see what appears in the IDE console output {hopefully it doesn't hide that with verbose off}. If the same 'arduino-builder' line appears, can you post it here and compare?

After making the change in the IDE to 'no verbose' rebuild under TSET in sublime - to see if it changed. TSET uses the same IDE command line outside the IDE, but the full build process the IDE uses is behind the build. It may have some influence on the output presented.
 
Yes some warnings are helpful but others are just crowding the screen and are annoying to close.

1 - I created a new simple ino that would generate one warning in the arduino IDE v 1.8.12.
2 - Checked compile in verbose settings. Compiler warnings set to none.
3 - Compile results are:
arduino-builder -dump-prefs -logger=machine -hardware
arduino-builder -compile -logger=machine -hardware
Warning is displayed
4 - Unchecked verbose. Compiler warnings set to none. Warning is there.
5 - Copied all the Tset files to the ino director and ran TSet.cmd
6 - Ran Compile.cmd. results:
No arduino-builder lines
Warning is displayed

Is this process correct?
 
Yes some warnings are helpful but others are just crowding the screen and are annoying to close.

1 - I created a new simple ino that would generate one warning in the arduino IDE v 1.8.12.
2 - Checked compile in verbose settings. Compiler warnings set to none.
3 - Compile results are:
arduino-builder -dump-prefs -logger=machine -hardware
arduino-builder -compile -logger=machine -hardware
Warning is displayed
4 - Unchecked verbose. Compiler warnings set to none. Warning is there.
5 - Copied all the Tset files to the ino director and ran TSet.cmd
6 - Ran Compile.cmd. results:
No arduino-builder lines
Warning is displayed

Is this process correct?

Seems like the steps 1,2,3 show the IDE is still showing the warning?
Until the IDE stops displaying the warning with some change in settings - then using TSET triggering the same build from command line will show the same behavior.

Capture and set aside the full console output leading to that warning display so the builder parameters and other are known.

If/When the warning can be 'hidden' - document the changed setting in the IDE that caused that, and capture again the full console output to compare.

Seeing a warning can point to a potential REAL problem with source interpretation - more than once ignoring a warning comes back to help after a couple of failed attempts to run the code where that 'warning' pointed to a fundamental code issue. Most warnings don't result in that, but they should be understood and corrected ... which is a problem when it is in a library/sources from others. PJRC is going to some effort to correct and remove all warnings from TeensyDuino included libraries: Paul has written build scripts to build examples and scrape out issues to clean up ... of course that is a large ongoing task.
 
Back
Top