By: Alexander C. Schreyer
Version: 3.1 (3/6/2013)
This code editor allows creating and modifying Ruby scripts directly within SketchUp. These scripts can be used to create geometry, add functionality or add data within the SketchUp 3D modeling environment.
This editor was originally an extension of Jim Folz's excellent
Web Console plugin.
I modified it mainly for two reasons: When I code, I permanently need to look up documentation.
To fix this, I added a bunch of reference webpages to a browser in a tab. There is also now a code-completion
feature (click CTRL-SPACE to activate). The other reason
was that I wanted it to behave a bit more like a real code editor, so I added a bit of jQuery magic
to make it look good and have some additional features. The editor now also uses the Codemirror 3.1 syntax highlighter to make the code more readable.
Contributors: Jim Folz, Dan Rathbun and others at SCF.
At this point, this editor has the following features:
- Execute multiline Ruby code directly in SketchUp
- Open and save files of any size
- Fast opening of large files
- Nice and clean user interface
- Tab key works as expected in editor (inserts spaces or tabs)
- Indenting/dedenting of code blocks
- Dropdown with code snippets inserts snippets at cursor
- Code-completion for SU classes and methods (click CTRL-SPACE to activate)
- On save, a backup file can be created
- Text size dropdown selects editor font size
- Line numbering in editor
- Matching brackets highlighting
- Undo in editor
- Undo (of code execution) button next to run button
- Single undo for entire code or multiple undo steps
- Results window keeps track of history
- Reliable editor dialog resizing
- Tab and accesskey navigation
- Reference web browser for common websites
- Browser zoom (a little buggy!)
- Style changer for user interface
- Buttons to explore selection object properties and object attributes
- Button for direct access to the Ruby console
- Clean printing of code
- Version update checking
Issues:
- Sometimes doesn't work when other code editors are running in SketchUp - Just restart SketchUp if there are problems
For feedback and feature suggestions, visit my webpage and leave a comment.