Sublime Text 2 - OpenSCAD - auto complete and syntax highlighting

by Klodd, published

Sublime Text 2 - OpenSCAD - auto complete and syntax highlighting by Klodd Jan 27, 2014


Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

3964Views 1214Downloads


A package that adds support for the openSCAD language in Sublime Text 2.

I made improvements mainly on the coloring part, derivative of the auto complete created by uminded.

Open Sublime Text 2.
Got to Preferences->Browse Packages.
Copy the unzipped "OpenSCAD" folder in there.
Open all your scad files!



  • 02/10/14: corrected cube syntax
  • 04/14/14: Thanks to Rutgerkdejong, added comments toggle with ctrl (or cmd) + /

All Apps

Upgrade this Thing with Thingiverse Apps

Tools and Utilities

Repair, slice, or enhance this Thing

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

I noticed that you made some alterations to the sublime text syntax language file . Could you please tell me the steps which you used to do this.

The code is fully available, I don't remember everything but I'm sure going through the code should be enough to understand.

Also, you're kinda spamming the comments here, you should have kept it in your original thread.

Don’t worry back on track

Your suggestion worked very well but stopped worKing do you perhaps any ideas on that?

Wow that’s great. Easy as well. Saves me a ton of time. Thanks

I’m using Sublime text 3 and would be pleased
If you explain how you run openscad from within the
Sublime editor..
Do you use a macro or combination keys

Hello hyman,
IIRC openSCAD has a "automatic reload and preview" in one of its menus. By saving the file in ST it refreshes the view in openSCAD.

So it's very simple :)

Thank You. Thank You.

This is awesome!
I am a long tile user of sublime text, and just started using OpenSCAD.
From the moment i started using it i missed many of the shortcuts and aut complete i was used to form Sublime when coding.

But, since i am pretty new to OpenSCAD i need to look allot at the preview to se WTF i am making :)

  • Is there any easy way to get a preview of the figure, or link the file to openSCAD in another window ?

Okay. I just did a bit of googling and found the answer :)
This is AWSOME!!!
Thanks a lot for making this awesome tool and making me experience with OpenSCAD even better!

You should add 'Comments.tmPreferences' to the package. I took the 'Comments (C++).tmPreferences' from the C++ package folder and modified it slightly and it works.

Thanks for the idea, I added a new version including this file and it works like a charm :)