yasnippet collection for thi.ng libraries
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Growing yasnippet code snippet collection for various thi.ng libraries:


cd ~/.emacs.d
git clone git@github.com:thi-ng/snippets.git thing-snippets

Then add directory to yasnippet search paths (in init.el):

(add-to-list 'yas-snippet-dirs "~/.emacs.d/thing-snippets")

Available snippets

Namespace choosers

Useful for importing various thi.ng lib namespaces in a :require spec:

thi.ng/color specific snippets

  • csscol => convert color to CSS string
  • cosgradient => cosine gradient gen (with preset chooser)

thi.ng/geom specific snippets

(Targets latest API state in dev-branch)

  • exportmesh (with type chooser) => export mesh in different formats
  • importmesh => import mesh (currently STL only)
  • ptfmesh => convert point seq to bezier to PTF mesh
  • txmat => 4x4 transform matrix (translate, rotate, scale)