Page History: Snippets

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: 2016/05/12 05:27


A snippet is a small container of re-usable code (math, text, regions). Ordinarily, it is intended as an unit to incorporate into larger programming modules.

Snippets in SMath Studio are simple *.sm files that are placed into the special "snippets" folder.



How to use a snippet

Every snippet can be inserted into the page:

  • using the Dynamic Assistance;

  • pressing TAB will insert snippet inside the collapsed Area Region
  • pressing Shift+TAB will insert just all snippet expressions without Area Region

Dynamic assistance

  • directly from the Snippet Manager of the Tools menu group.

Snippet Manager

In the Snippet Manager it is possible to download snippets made by other users and shared through the Relase Manager; to do this, change the top-right button target from Local storage to Online gallery

More snippets

These snippets are stored in the user's folder %APPDATA%\SMath\extensions\snippets


How to make a snippet

To make a *.sm file a snippet, follow these steps:

  • go in the File > Properties > File attributes menu and setup a Snippet Shortcut;

Snippet Manager

  • save the file in the snippets folder (in Windows 7 this is usually C:\Program Files (x86)\SMath Studio\snippets);


History

  • SMath 0.90 (Stable): Snippets feature implemented;
  • SMath 0.95.4594 (Stable): all the available snippet's title translations are included to collapsed Area on snippet insert;
  • SMath 0.97.5280 (Nightly build): Fixed inserted snippet layout when collapsed Area Region exists inside Snippet;


See also



References




ScrewTurn Wiki version 2.0.37. Some of the icons created by FamFamFam.