OpenScad NotePad++ AutoComplete with CallTips
by garyacrowellsr, published
Liked ByView 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
NotePad++ is a free programmer's editor that works wonderfully in place of the OpenSCAD internal editor. If you aren't already using NotePad (or some similar external editor), you're definitely limiting your OpenSCAD productivity.
There have been a couple of NotePad++ AutoComplete files posted on Thingiverse for OpenScad (including one of mine), but none have implemented the CallTip feature of NotePad. You're familiar with autocomplete - it's the sometimes annoying feature (that you sometimes turn off) that completes a word after the first few letters are typed. The CallTip feature (aka ToolTips) pops up a box detailing the command syntax of the item being entered.
In the implementation here, I've configured the Autocomplete to be active for nearly all OpenSCAD commands and terms, and, I've extended that somewhat to include combinations of commands that I find I use often. For example, just typing "tra" plus a couple of down arrows and enter, will enter:
translate ([0, 0, 0]) rotate (a = [0, 0, 0]) cube (size = [1, 1, 1]);
CallTips in NotePad++ are intended to assist with function-type commands only, but I have implemented it to include many non-function type statements. Nearly all OpenScad keywords have a CallTip, which is brought up by typing an opening parenthesis "(" at the end of the word. In some cases ("if", "polyhedron"), these CallTips can be quite extensive, including examples of use. I intend to expand this further, as this is definitely a work-in-progress.
The language file was originated by Justblair, Thing:15363, and lately I have made some updates to it.
Updated 10/23/13: Added some closing parens and semicolons where it seemed appropriate and made spaces more consistent.
Updated 05/15/14. Fixed a few typos, added a few more keywords and calltips; updated the language file. Improved the install instructions a little bit, but yeah, I get confused too.
Installing the programs:
If you haven't already, install OpenScad from
If you haven't already, install NotePad++ from
Note The most recent versions of NotePad++ seem to have broken the autocomplete and calltips file. The NotePad++ site contains all older versions, so I would recommend using v6.5.3 This seems to be the latest one that works for this..
Installing the files
Download the two files included here, OpenSCAD_API.xml and OpenSCAD_language.xml
Copy the file OpenSCAD_language.xml to the directory C:\ProgramFiles(x86)/Notepad++ and change the filename to OpenSCAD.xml
Copy the file OpenSCAD_API.xml to the directory C:\ProgramFiles(x86)/Notepad++/plugins/APIs and change the filename to OpenSCAD.xml (yes, the same filename as the other one, so don't get them mixed up!)
Configuring the software
In OpenSCAD, click the Design menu item, and under it, check the Automatic Reload and Compile item.
In NotePad++ click the Language menu and select the Define your language... item. In the open dialog, click the Import.. button. An Open File dialog will open; navigate to the language OpenSCAD.xml file and open it. If you now look under the Language menu item, OpenSCAD should appear at the bottom.
Under Settings/Preferences, Auto-Completion tab, enable auto-completion, Function and word completion, Function parameters hint, and the number of characters (2 or 3).
Under Settings/Style Configurator.. select a Style theme with a darker background color (that works with the OpenSCAD keyword highlighting) and check Enable global background color.
Using OpenSCAD with NotePad++ AutoComplete and CallTips
Open the same .scad file in OpenSCAD and NotePad++. The NotePad window should be displaying the file with proper syntax highlighting. After editing a file in NotePad, entering Ctl-s will cause the file to be reloaded and recompiled by OpenSCAD. You can minimize or hide the OpenSCAD editor window - you won't want to use it much anymore.
AutoComplete: Typing the first two or three letters of an OpenSCAD keyword, will open the AutoComplete box and you can arrow up/down in this box to select the word to complete, and enter will enter the word.
CallTips: The CallTip feature in NotePad is intended for use with program functions, so the character set to open a CallTip is the open parenthesis "(". In the AutoComplete box, most keywords are shown with and without a "(". If you select one with a "(", backspace over it, type a "(" and the CallTip will appear. If you select one without a "(", just type the "(" (even if that keyword doesn't normally have an opening paren), and the CallTip will appear (if one is associated - most do, a few don't, yet).
Upgrade this Thing with Thingiverse Apps
OpenScad NotePad++ AutoComplete with CallTips by garyacrowellsr is licensed under the Creative Commons - Attribution - Share Alike license.
What does this mean?
- You must attribute (give credit) to the creator of this Thing.
- You must distribute Remixes under the same license as the original.
- Remixing or Changing this Thing is allowed.
- Commercial use is allowed.
Show Some Love
Say thanks by giving garyacrowellsr a tip and help them continue to share amazing Things with the Thingiverse community.Tip Designer
We're sure garyacrowellsr would love to see what you've printed. Please document your print and share a Make with the community.
To post a Make simply visit this Thing again and click I Made One to start uploading your photo. It’s even easier to post a Make via the Thingiverse Mobile app (available via Google Play and Apple App Store).