<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=Code_Snippets</id>
	<title>Code Snippets - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=Code_Snippets"/>
	<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Code_Snippets&amp;action=history"/>
	<updated>2026-05-15T21:47:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Code_Snippets&amp;diff=237&amp;oldid=prev</id>
		<title>JoeStrout: Created page with &quot;In Mini Micro, ''code snippets'' are a feature of the code editor.  These are bits of code which can be inserted from the Code button in the toolbar, optionally wrapping a...&quot;</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Code_Snippets&amp;diff=237&amp;oldid=prev"/>
		<updated>2020-03-18T20:41:19Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;In &lt;a href=&quot;/wiki/Mini_Micro&quot; title=&quot;Mini Micro&quot;&gt;Mini Micro&lt;/a&gt;, &amp;#039;&amp;#039;code snippets&amp;#039;&amp;#039; are a feature of the code editor.  These are bits of code which can be inserted from the Code button in the toolbar, optionally wrapping a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In [[Mini Micro]], ''code snippets'' are a feature of the code editor.  These are bits of code which can be inserted from the Code button in the toolbar, optionally wrapping any previously selected text.&lt;br /&gt;
&lt;br /&gt;
There are several built-in code snippets (&amp;quot;for loop&amp;quot;, &amp;quot;while loop&amp;quot;, etc.), and you can add your own.  To do so, create a text file on your user disk at the path /usr/data/codeSnippets.txt.  This file should look something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;===for loop&lt;br /&gt;
for _loopVar_ in _range_&lt;br /&gt;
	_code_&lt;br /&gt;
end for&lt;br /&gt;
===while loop&lt;br /&gt;
while _condition_&lt;br /&gt;
	_code_&lt;br /&gt;
end while&lt;br /&gt;
===if block&lt;br /&gt;
if _condition_ then&lt;br /&gt;
	_code_&lt;br /&gt;
end if&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each block begins with three equals signs (&amp;quot;===&amp;quot;), and the name of the block as it should appear in the Code menu.  The body of the block extends from the next line, to either the next &amp;quot;===&amp;quot; or the end of the file.  If the special text &amp;quot;_code_&amp;quot; appears in the body of the block, that will be replaced with the previously selected text when the code block is applied.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>JoeStrout</name></author>
		
	</entry>
</feed>