- Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlanguage_support_atom.html
141 lines (141 loc) · 10.8 KB
/
language_support_atom.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<htmllang="en">
<head>
<metacharset="utf-8">
<metahttp-equiv="X-UA-Compatible" content="IE=edge">
<metaname="viewport" content="width=device-width, initial-scale=1">
<title>SmallBASIC | language_support_atom</title>
<metaname="description" content="SmallBASIC | One more basic">
<linkrel="canonical" href="/language_support_atom.html">
<linkrel="keywords" href="language_support_atom">
<linkrel="stylesheet" href="/css/style.css">
<linkrel="icon" type="image/png" href="/images/sb-desktop-32x32.png">
<scriptsrc="/clipboard.js"></script>
</head>
<body>
<buttononclick="topFunction()" id="BackToTopBtn" title="Go to top">⯅</button>
<scriptsrc="/backtotop.js"></script>
<divclass="wrapAll clearfix">
<navclass="navigation">
<divclass="logo">
<ahref="/"><imgsrc='/images/sb-logo.png?v=2' alt="logo"></a>
</div>
<divclass="navlinks">
<ahref="/pages/download.html">Download</a>
<ahref="/pages/news.html">News</a>
<ahref="/pages/community.html">Community</a>
<aclass='active' href="/pages/articles.html">Resources</a>
<ahref="/pages/reference.html">Language Reference</a>
<ahref="/pages/guide.html">SmallBASIC Manual</a>
</div>
</nav>
<divclass="mainsection">
<divclass="tabs clearfix">
<divclass="tabsRight">
<atarget="_github" href="https://github.com/smallbasic/smallbasic.github.io/blob/master/_build/pages/language_support_atom.markdown">Edit</a>
<atarget="_github" href="https://github.com/smallbasic/smallbasic.github.io/commits/master/_build/pages/language_support_atom.markdown">History</a>
</div>
</div>
<divclass="article">
<h1id="smallbasic-in-atom">SmallBASIC in Atom</h1>
<blockquote>
<p>Using Atom</p>
</blockquote>
<p><em>“Atom is a free and open-source text and source code editor for
macOS, Linux, and Microsoft Windows with support for plug-ins written in
JavaScript, and embedded Git Control. Developed by GitHub, Atom is a
desktop application built using web technologies. Most of the extending
packages have free software licenses and are community-built and
maintained. Atom is based on Electron (formerly known as Atom Shell),a
framework that enables cross-platform desktop applications using
Chromium and Node.js.Atom was initially written in CoffeeScript and
Less, but much of it has been converted to JavaScript.</em><em>Atom was
released from beta, as version 1.0, on 25 June 2015. Its developers call
it a “hackable text editor for the 21st Century”, as it is fully
customizable in HTML, CSS, and JavaScript.” (<a
href="https://en.wikipedia.org/wiki/Atom_(text_editor)">wikipedia</a>)</em></p>
<figure>
<img
src="https://github.com/Joe7M/smallbasic.atom.syntaxcoloring/raw/main/Screenshot.png"
alt="Example" />
<figcaptionaria-hidden="true">Example</figcaption>
</figure>
<h2id="setup-syntax-highlighting-and-coloring">Setup Syntax
Highlighting and Coloring</h2>
<p>The Atom package for syntax highlighting and code snippets can be
installed with the build in package manager. Go to
“Edit->Preferences->Install”. Search for “lang-smallbasic” and
install the package.</p>
<h2id="setup-code-execution">Setup Code Execution</h2>
<p>To execute the bas-file, a package for command execution needs to be
installed. Please search for “atom-shell-commands” and install it. Next
you have to open the atom config-file “Edit->Config”. Insert the
following code into “config.cson”:</p>
<divclass="sourceCode" id="cb1"><pre
class="sourceCode cson"><codeclass="sourceCode coffee"><spanid="cb1-1"><ahref="#cb1-1" aria-hidden="true" tabindex="-1"></a><spanclass="st">"atom-shell-commands"</span><spanclass="kw">:</span></span>
<spanid="cb1-2"><ahref="#cb1-2" aria-hidden="true" tabindex="-1"></a> commands<spanclass="kw">:</span><spanclass="kw">[</span></span>
<spanid="cb1-3"><ahref="#cb1-3" aria-hidden="true" tabindex="-1"></a><spanclass="kw">{</span></span>
<spanid="cb1-4"><ahref="#cb1-4" aria-hidden="true" tabindex="-1"></a> name<spanclass="kw">:</span><spanclass="st">"run"</span></span>
<spanid="cb1-5"><ahref="#cb1-5" aria-hidden="true" tabindex="-1"></a> command<spanclass="kw">:</span><spanclass="st">"C:/Users/Joe7M/Documents/SmallBASIC/bin/sbasicg.exe"</span></span>
<spanid="cb1-6"><ahref="#cb1-6" aria-hidden="true" tabindex="-1"></a> arguments<spanclass="kw">:</span><spanclass="kw">[</span></span>
<spanid="cb1-7"><ahref="#cb1-7" aria-hidden="true" tabindex="-1"></a><spanclass="st">"-r"</span></span>
<spanid="cb1-8"><ahref="#cb1-8" aria-hidden="true" tabindex="-1"></a><spanclass="st">"{FileName}"</span></span>
<spanid="cb1-9"><ahref="#cb1-9" aria-hidden="true" tabindex="-1"></a><spanclass="kw">]</span></span>
<spanid="cb1-10"><ahref="#cb1-10" aria-hidden="true" tabindex="-1"></a> options<spanclass="kw">:</span></span>
<spanid="cb1-11"><ahref="#cb1-11" aria-hidden="true" tabindex="-1"></a> cwd<spanclass="kw">:</span><spanclass="st">"{FileDir}"</span></span>
<spanid="cb1-12"><ahref="#cb1-12" aria-hidden="true" tabindex="-1"></a> keymap<spanclass="kw">:</span><spanclass="st">"f8"</span></span>
<spanid="cb1-13"><ahref="#cb1-13" aria-hidden="true" tabindex="-1"></a> save<spanclass="kw">:</span><spanclass="ot">true</span></span>
<spanid="cb1-14"><ahref="#cb1-14" aria-hidden="true" tabindex="-1"></a><spanclass="kw">}</span></span>
<spanid="cb1-15"><ahref="#cb1-15" aria-hidden="true" tabindex="-1"></a><spanclass="kw">]</span></span></code></pre></div>
<p>Afterwards your config.cson file should look similar to this:</p>
<divclass="sourceCode" id="cb2"><pre
class="sourceCode cson"><codeclass="sourceCode coffee"><spanid="cb2-1"><ahref="#cb2-1" aria-hidden="true" tabindex="-1"></a><spanclass="st">"*"</span><spanclass="kw">:</span></span>
<spanid="cb2-2"><ahref="#cb2-2" aria-hidden="true" tabindex="-1"></a><spanclass="st">"atom-shell-commands"</span><spanclass="kw">:</span></span>
<spanid="cb2-3"><ahref="#cb2-3" aria-hidden="true" tabindex="-1"></a> commands<spanclass="kw">:</span><spanclass="kw">[</span></span>
<spanid="cb2-4"><ahref="#cb2-4" aria-hidden="true" tabindex="-1"></a><spanclass="kw">{</span></span>
<spanid="cb2-5"><ahref="#cb2-5" aria-hidden="true" tabindex="-1"></a> name<spanclass="kw">:</span><spanclass="st">"run"</span></span>
<spanid="cb2-6"><ahref="#cb2-6" aria-hidden="true" tabindex="-1"></a> command<spanclass="kw">:</span><spanclass="st">"C:/Users/Joe7M/Documents/SmallBASIC/bin/sbasicg.exe"</span></span>
<spanid="cb2-7"><ahref="#cb2-7" aria-hidden="true" tabindex="-1"></a> arguments<spanclass="kw">:</span><spanclass="kw">[</span></span>
<spanid="cb2-8"><ahref="#cb2-8" aria-hidden="true" tabindex="-1"></a><spanclass="st">"-r"</span></span>
<spanid="cb2-9"><ahref="#cb2-9" aria-hidden="true" tabindex="-1"></a><spanclass="st">"{FileName}"</span></span>
<spanid="cb2-10"><ahref="#cb2-10" aria-hidden="true" tabindex="-1"></a><spanclass="kw">]</span></span>
<spanid="cb2-11"><ahref="#cb2-11" aria-hidden="true" tabindex="-1"></a> options<spanclass="kw">:</span></span>
<spanid="cb2-12"><ahref="#cb2-12" aria-hidden="true" tabindex="-1"></a> cwd<spanclass="kw">:</span><spanclass="st">"{FileDir}"</span></span>
<spanid="cb2-13"><ahref="#cb2-13" aria-hidden="true" tabindex="-1"></a> keymap<spanclass="kw">:</span><spanclass="st">"f8"</span></span>
<spanid="cb2-14"><ahref="#cb2-14" aria-hidden="true" tabindex="-1"></a> save<spanclass="kw">:</span><spanclass="ot">true</span></span>
<spanid="cb2-15"><ahref="#cb2-15" aria-hidden="true" tabindex="-1"></a><spanclass="kw">}</span></span>
<spanid="cb2-16"><ahref="#cb2-16" aria-hidden="true" tabindex="-1"></a><spanclass="kw">]</span></span>
<spanid="cb2-17"><ahref="#cb2-17" aria-hidden="true" tabindex="-1"></a> core<spanclass="kw">:</span></span>
<spanid="cb2-18"><ahref="#cb2-18" aria-hidden="true" tabindex="-1"></a> telemetryConsent<spanclass="kw">:</span><spanclass="st">"no"</span></span>
<spanid="cb2-19"><ahref="#cb2-19" aria-hidden="true" tabindex="-1"></a><spanclass="st">"exception-reporting"</span><spanclass="kw">:</span></span>
<spanid="cb2-20"><ahref="#cb2-20" aria-hidden="true" tabindex="-1"></a> userId<spanclass="kw">:</span><spanclass="st">"xxxx-xxxx-xxxx-xxxx"</span></span>
<spanid="cb2-21"><ahref="#cb2-21" aria-hidden="true" tabindex="-1"></a><spanclass="st">"exec-in-cmd"</span><spanclass="kw">:</span></span>
<spanid="cb2-22"><ahref="#cb2-22" aria-hidden="true" tabindex="-1"></a> terminal<spanclass="kw">:</span><spanclass="st">"konsole"</span></span>
<spanid="cb2-23"><ahref="#cb2-23" aria-hidden="true" tabindex="-1"></a> welcome<spanclass="kw">:</span></span>
<spanid="cb2-24"><ahref="#cb2-24" aria-hidden="true" tabindex="-1"></a> showOnStartup<spanclass="kw">:</span><spanclass="ot">false</span></span></code></pre></div>
<p>Please edit the following line to match your system, for example in
Windows:</p>
<divclass="sourceCode" id="cb3"><pre
class="sourceCode cson"><codeclass="sourceCode coffee"><spanid="cb3-1"><ahref="#cb3-1" aria-hidden="true" tabindex="-1"></a>command<spanclass="kw">:</span><spanclass="st">"C:/Users/Joe7M/Documents/SmallBASIC/bin/sbasicg.exe"</span></span></code></pre></div>
<p>please use “/” in Windows instead of the usual “\”.</p>
<p>In Linux:</p>
<divclass="sourceCode" id="cb4"><pre
class="sourceCode cson"><codeclass="sourceCode coffee"><spanid="cb4-1"><ahref="#cb4-1" aria-hidden="true" tabindex="-1"></a>command<spanclass="kw">:</span><spanclass="st">"/home/Joe7M/SmallBASIC/bin/sbasicg"</span></span></code></pre></div>
<p>With</p>
<divclass="sourceCode" id="cb5"><pre
class="sourceCode cson"><codeclass="sourceCode coffee"><spanid="cb5-1"><ahref="#cb5-1" aria-hidden="true" tabindex="-1"></a>keymap<spanclass="kw">:</span><spanclass="st">"f8"</span></span></code></pre></div>
<p>you can choose the key to execute the script.</p>
<p>After successful installation you can start the SmallBASIC file by
pressing F8 or by “Packages->Atom Shell Commands->run”</p>
</div>
<divclass="pagefooter">
This page was last edited on Tue, 15 Feb 2022 13:00:25 +1000
|
<ahref="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
processed with
<ahref="https://pandoc.org/MANUAL.html#pandocs-markdown" target="_blank" rel="nofollow">pandoc 3.1.12.1</a>
</div>
</div>
</div>
</body>
</html>