Loading
Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

OpenSCAD/TextWrangler Language Module

by TheNewHobbyist, published

OpenSCAD/TextWrangler Language Module by TheNewHobbyist May 1, 2012

Description

I've been putting off learning OpenSCAD for awhile because it seemed too cumbersome to work in. That is, until I found Justblair's guide to "live" editing with NotePad++. Since I'm a Mac user I thought I'd start adapting his guide and text editor language plugin to my free text editor of choice, TextWrangler.

This is a work in progress, as you can see from the screen shots some highlighting is enabled. I'm still working out how to get string highlighting working properly. Anyone want to contribute?

Recent Comments

view all
I've been adding 2014 stuff as I use it. I'll try to upload a cleaned up version for 2014 soon.
Any plans to update this for the 2014 version of OpenSCAD?
This is brilliant. Thanks!

More from Tools

view more

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

Instructions

Installing the OpenSCAD Language Module

  1. Close TextWrangler

  2. Copy OpenSCAD.plist to ~/Library/Application Support/TextWrangler/Language Modules

  3. Open a .scad file in TextWrangler

Using TextWrangler With OpenSCAD (Edited from Justblair's Windows instructions)

  1. Open OpenSCAD, Create a new file and save it.

  2. In the Design menu select Automatic Reload and Compile

  3. In the View menu select Hide editor

  4. Leaving OpenSCAD running, now find your newly created .scad file in Finder, right-click on it and select "Open With" TextWrangler.app

  5. Arrange both OpenSCAD and TextWrangler so that both can be seen at once.

  6. Edit your .scad file in TextWrangler. Each time you save the file (Command + S) you will see that OpenSCAD will recompile the object.

Enjoy all the advanced text editing features of TextWrangler as well as syntax highlighting of your code!!!

Any plans to update this for the 2014 version of OpenSCAD?
I've been adding 2014 stuff as I use it. I'll try to upload a cleaned up version for 2014 soon.
This is brilliant. Thanks!
This also works just fine in BBEdit. Do the same things except choose BBEdit's folder in application support instead of Text Wrangler. Yay! much nicer than OpenSCAD's text editing! Thanks!
Excellent! My thing (15244) was just a quick hack and I never extended it. Have you got further into the docs? It seems there's a new web page I'd not seen before on codeless language modules (CLM): barebones.com/support/develop/clm.html
I've read the CLM docs and while helpful they don't have much detail on the structure of the regular expressions used in the comment/string coloring. I've been poking around the existing examples and have made some progress (http://i.imgur.com/0uRD5.png).

If you delve into the docs and make any progress let me know!
I've been using Michthom's thingiverse.com/thing:15244 for this, I'm glad to see more development in the field of improving openscad's miserable user interface.
OpenSCAD syntax highlights in BBEdit/TextWrangler
One of these popped up a while ago, but like this one, it fails to color numeric literals, which makes is less useful than just using the ANSI-C module. I tried to find a way to fix this once, but didn't find a way to make it work. Unfortunately, there don't seem to be files in the same format for the built-in language modules that can be used as a reference.
I think you mean something like this?

i.imgur.com/0uRD5.png

I've got something partially working, I'm trying to get string/comments regular expressions figured out in the language file but I think that should take care of it.
Top