Wikia

Vim Tips Wiki

Script:3556

Talk0
1,612pages on
this wiki
Revision as of 09:40, January 11, 2014 by 46.128.222.19 (Talk)

Use this page to discuss script 3556 openscad: syntax highlighting for the OpenSCAD 3D modeling language

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Primitives

To my copy, I added the 2d primitives:

syn keyword openscad2dPrimitive square circle polygon import_dxf<br>
hi def link openscad2dPrimitive			Keyword

--June 23, 2012

Thanks, I've added this to the code. -Taj 20130306

Auto enable

To get it to work automajickally, I added this to my .vimrc after copying the script to .vim/syntax/

au BufNewFile,BufRead *.scad            setf openscad

--December 2, 2012

Hull, extrusion and import operators

I added highlighting for the convex hull, extrusion (linear and rotational) and import operators:

--- /tmp/vim-openscad/syntax/openscad.vim       2013-03-05 04:47:36.000000000 +0100
+++ openscad.vim        2014-01-11 10:36:06.640895113 +0100
@@ -23,9 +23,10 @@
 syn keyword openscadRepeat for intersection_for
 syn keyword openscadInclude include use
 syn keyword openscadCsgKeyword union difference intersection render intersection_for
-syn keyword openscadTransform scale rotate translate mirror multmatrix color minkowski 
+syn keyword openscadTransform scale rotate translate mirror multmatrix color minkowski hull linear_extrude rotate_extrude
 syn keyword openscadPrimitiveSolid cube sphere cylinder polyhedron surface
 syn keyword openscadPrimitive2D square circle polygon import_dxf
+syn keyword openscadPrimitiveImport import
 
 syn match openscadSpecialVariable "\$[a-zA-Z]\+\>" display
 syn match openscadModifier "^\s*[\*\!\#\%]" display
@@ -66,6 +67,7 @@
 hi def link openscadNumber                         Number
 hi def link openscadPrimitiveSolid             Keyword
 hi def link openscadPrimitive2D                Keyword
+hi def link openscadPrimitiveImport    Keyword
 hi def link openscadRepeat                         Repeat
 hi def link openscadSpecialVariable            Special
 hi def link openscadString                         String

--

Comments

Around Wikia's network

Random Wiki