-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathlanguage_support_atom.html
More file actions
141 lines (141 loc) · 10.8 KB
/
Copy pathlanguage_support_atom.html
File metadata and controls
141 lines (141 loc) · 10.8 KB
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>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SmallBASIC | language_support_atom</title>
<meta name="description" content="SmallBASIC | One more basic">
<link rel="canonical" href="/language_support_atom.html">
<link rel="keywords" href="language_support_atom">
<link rel="stylesheet" href="/css/style.css">
<link rel="icon" type="image/png" href="/images/sb-desktop-32x32.png">
<script src="/clipboard.js"></script>
</head>
<body>
<button onclick="topFunction()" id="BackToTopBtn" title="Go to top">⯅</button>
<script src="/backtotop.js"></script>
<div class="wrapAll clearfix">
<nav class="navigation">
<div class="logo">
<a href="/"><img src='/images/sb-logo.png?v=2' alt="logo"></a>
</div>
<div class="navlinks">
<a href="/pages/download.html">Download</a>
<a href="/pages/news.html">News</a>
<a href="/pages/community.html">Community</a>
<a class='active' href="/pages/articles.html">Resources</a>
<a href="/pages/reference.html">Language Reference</a>
<a href="/pages/guide.html">SmallBASIC Manual</a>
</div>
</nav>
<div class="mainsection">
<div class="tabs clearfix">
<div class="tabsRight">
<a target="_github" href="https://github.com/smallbasic/smallbasic.github.io/blob/master/_build/pages/language_support_atom.markdown">Edit</a>
<a target="_github" href="https://github.com/smallbasic/smallbasic.github.io/commits/master/_build/pages/language_support_atom.markdown">History</a>
</div>
</div>
<div class="article">
<h1 id="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/smallbasic/smallbasic.syntax-highlighting/raw/main/atom/Screenshot.png"
alt="Example" />
<figcaption aria-hidden="true">Example</figcaption>
</figure>
<h2 id="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>
<h2 id="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>
<div class="sourceCode" id="cb1"><pre
class="sourceCode cson"><code class="sourceCode coffee"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="st">"atom-shell-commands"</span><span class="kw">:</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> commands<span class="kw">:</span> <span class="kw">[</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="kw">{</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> name<span class="kw">:</span> <span class="st">"run"</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> command<span class="kw">:</span> <span class="st">"C:/Users/Joe7M/Documents/SmallBASIC/bin/sbasicg.exe"</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> arguments<span class="kw">:</span> <span class="kw">[</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> <span class="st">"-r"</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> <span class="st">"{FileName}"</span></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="kw">]</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> options<span class="kw">:</span></span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> cwd<span class="kw">:</span> <span class="st">"{FileDir}"</span></span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> keymap<span class="kw">:</span> <span class="st">"f8"</span></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> save<span class="kw">:</span> <span class="ot">true</span></span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a> <span class="kw">}</span></span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="kw">]</span></span></code></pre></div>
<p>Afterwards your config.cson file should look similar to this:</p>
<div class="sourceCode" id="cb2"><pre
class="sourceCode cson"><code class="sourceCode coffee"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="st">"*"</span><span class="kw">:</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="st">"atom-shell-commands"</span><span class="kw">:</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> commands<span class="kw">:</span> <span class="kw">[</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">{</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a> name<span class="kw">:</span> <span class="st">"run"</span></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a> command<span class="kw">:</span> <span class="st">"C:/Users/Joe7M/Documents/SmallBASIC/bin/sbasicg.exe"</span></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a> arguments<span class="kw">:</span> <span class="kw">[</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a> <span class="st">"-r"</span></span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a> <span class="st">"{FileName}"</span></span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a> <span class="kw">]</span></span>
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a> options<span class="kw">:</span></span>
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a> cwd<span class="kw">:</span> <span class="st">"{FileDir}"</span></span>
<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a> keymap<span class="kw">:</span> <span class="st">"f8"</span></span>
<span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a> save<span class="kw">:</span> <span class="ot">true</span></span>
<span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a> <span class="kw">}</span></span>
<span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a> <span class="kw">]</span></span>
<span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a> core<span class="kw">:</span></span>
<span id="cb2-18"><a href="#cb2-18" aria-hidden="true" tabindex="-1"></a> telemetryConsent<span class="kw">:</span> <span class="st">"no"</span></span>
<span id="cb2-19"><a href="#cb2-19" aria-hidden="true" tabindex="-1"></a> <span class="st">"exception-reporting"</span><span class="kw">:</span></span>
<span id="cb2-20"><a href="#cb2-20" aria-hidden="true" tabindex="-1"></a> userId<span class="kw">:</span> <span class="st">"xxxx-xxxx-xxxx-xxxx"</span></span>
<span id="cb2-21"><a href="#cb2-21" aria-hidden="true" tabindex="-1"></a> <span class="st">"exec-in-cmd"</span><span class="kw">:</span></span>
<span id="cb2-22"><a href="#cb2-22" aria-hidden="true" tabindex="-1"></a> terminal<span class="kw">:</span> <span class="st">"konsole"</span></span>
<span id="cb2-23"><a href="#cb2-23" aria-hidden="true" tabindex="-1"></a> welcome<span class="kw">:</span></span>
<span id="cb2-24"><a href="#cb2-24" aria-hidden="true" tabindex="-1"></a> showOnStartup<span class="kw">:</span> <span class="ot">false</span></span></code></pre></div>
<p>Please edit the following line to match your system, for example in
Windows:</p>
<div class="sourceCode" id="cb3"><pre
class="sourceCode cson"><code class="sourceCode coffee"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>command<span class="kw">:</span> <span class="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>
<div class="sourceCode" id="cb4"><pre
class="sourceCode cson"><code class="sourceCode coffee"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>command<span class="kw">:</span> <span class="st">"/home/Joe7M/SmallBASIC/bin/sbasicg"</span></span></code></pre></div>
<p>With</p>
<div class="sourceCode" id="cb5"><pre
class="sourceCode cson"><code class="sourceCode coffee"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>keymap<span class="kw">:</span> <span class="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>
<div class="pagefooter">
This page was last edited on Tue, 15 Feb 2022 13:00:25 +1000
|
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
processed with
<a href="https://pandoc.org/MANUAL.html#pandocs-markdown" target="_blank" rel="nofollow">pandoc 3.5</a>
</div>
</div>
</div>
</body>
</html>