Skip to content

Commit 7b47429

Browse files
authored
Merge pull request #29 from Joe7M/master
Syntax highlighting for jEdit and Micro
2 parents 8f5cc7e + e65fae9 commit 7b47429

10 files changed

Lines changed: 67 additions & 27 deletions

_build/pages/language_support.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ Contents
1414
#. [Geany](/pages/language_support_geany.html)
1515
#. [Sublime Text](/pages/language_support_sublimetext.html)
1616
#. [KDE Kate](/pages/language_support_kdekate.html)
17+
#. [jEdit](/pages/language_support_jedit.html)
18+
#. [Micro](/pages/language_support_micro.html)
1719
:::
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SmallBASIC in jEdit
2+
3+
> Using jEdit
4+
5+
_"jEdit is a free software text editor available under GPL-2.0-or-later. It is written in Java and runs on any operating system with Java support, including BSD, Linux, macOS and Windows. " ([wikipedia](https://en.wikipedia.org/wiki/JEdit))_
6+
7+
![Example](https://github.com/Joe7M/smallbasic.jedit.syntaxcoloring/blob/main/Screenshot.png)
8+
9+
## Setup Syntax Highlighting and Coloring
10+
11+
- Download the file `smallbasic.xml` from [Github](https://github.com/Joe7M/smallbasic.jedit.syntaxcoloring)
12+
- Start jedit
13+
- Go to `Utilities -> Global Options -> Editing -> Edit Modes`
14+
- In the section `Add Mode` create a new mode:
15+
- Mode Name: 'smallbasic'
16+
- Select Mode File: select `smallbasic.xml`
17+
- File Name Glob: `*.bas`
18+
- First Line Glob: leave empty
19+
- Click button `Add Mode`
20+
21+
Tip: In `Utilities -> Global Options -> Editing -> Edit Modes` you can remove `vbscript` from the section `Selected modes` to make SmallBASIC the standard syntax highlighting for bas files.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SmallBASIC in Micro
2+
3+
> Using Micro
4+
5+
_"Micro is a modern and intuitive terminal-based text editor " ([micro](https://micro-editor.github.io/))_
6+
7+
![Example](https://github.com/Joe7M/smallbasic.micro.syntaxcoloring/blob/main/Screenshot.png)
8+
9+
## Setup Syntax Highlighting and Coloring
10+
11+
Download the file `smallbasic.yaml` from [github](https://github.com/Joe7M/smallbasic.micro.syntaxcoloring) and copy it to `~/.config/micro/syntax/`.

_build/reference/589-file-dirwalk.markdown

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# DIRWALK
22

3-
> DIRWALK directory [, wildcards] [USE ...]
3+
> DIRWALK dir [, wildcards] [USE f(x)]
44
5-
Walk through the specified directories. The user-defined function must returns zero to stop the process.
6-
The user defined function takes `x` as a parameter. `x` contains information about the current file.
5+
Walk through the specified directory `dir` and its subdirectories. The user defined function `f(x)` takes `x` as a parameter. `x` contains information about the current file. `f(x)` must return zero to stop the process. `wildcards` can be used to filter the files.
76

8-
## Example 1: Print all files
7+
### Example 1: Print all files
98

109
```
1110
FUNC PRNF(x)
@@ -16,7 +15,7 @@ END
1615
DIRWALK "." USE PRNF(x)
1716
```
1817

19-
## Example 2: Create a list of all files
18+
### Example 2: Create a list of all files
2019

2120
```
2221
FUNC ListFiles(x)
@@ -31,7 +30,7 @@ for n in FileList
3130
next
3231
```
3332

34-
## Example 3: Search for a certain file using wildcards
33+
### Example 3: Search for a certain file using wildcards
3534

3635
```
3736
FUNC ListFiles(x)
@@ -46,7 +45,7 @@ for n in FileList
4645
next
4746
```
4847

49-
## Example 4: Search a certain file using user defined function
48+
### Example 4: Search a certain file using user defined function
5049

5150
```
5251
func SearchFile(x)
@@ -63,7 +62,7 @@ DIRWALK "." USE SearchFile(x)
6362
print path
6463
```
6564

66-
## Example 5: Using wilcards
65+
### Example 5: Using wilcards
6766

6867
```
6968
FUNC ListFiles(x)
@@ -78,7 +77,7 @@ for n in FileList
7877
next
7978
```
8079

81-
## Example 6: File list utility
80+
### Example 6: File list utility
8281

8382
~~~
8483

_build/reference/615-graphics-draw.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
> DRAW CommandString
44
5-
Draw lines as specified by the given CommandString. The CommandString is created using commands from the Graphics Definition Language.
5+
Draw lines as specified by the given `CommandString`. The `CommandString` is created using commands from the Graphics Definition Language.
66
The start point for drawing can be defined using the PSET command. COLOR can be used to change the color of the lines.
77

8-
## Graphics Definition Language
8+
### Graphics Definition Language
99

1010
In the movement instructions below, n specifies a distance to move in pixel.
1111

@@ -24,7 +24,7 @@ In the movement instructions below, n specifies a distance to move in pixel.
2424
| N | A prefix command. Next movement command moves, but returns immediately to previous point.
2525

2626

27-
## Example 1: Let's draw a house
27+
### Example 1: Let's draw a house
2828

2929
```
3030
COLOR 9

_build/reference/617-graphics-image.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ dim png
137137
i.save(png)
138138
```
139139

140-
### Clip command (console version only)
140+
### Clip command
141141

142-
Reduces the size of the image.
142+
Clips the image. Next draw or show command will display only this part of the image. On the same image a new clip can be set.
143143

144144
```
145-
png.clip(left, top, right, bottom)
145+
i.clip(left, top, width, height)
146146
```
147147

148148
### Filter command (console version only)

_build/reference/642-language-do.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
55
This keyword is used to declare single-line commands. It can be used with WHILE and FOR-family commands.
66

7-
## Example 1
7+
### Example 1
88

99
```
1010
For i = 1 to 10 do print i
1111
```
1212

13-
## Example 2
13+
### Example 2
1414
```
1515
FOR f IN files("*.txt") DO PRINT f
1616
```
1717

18-
## Example 3
18+
### Example 3
1919

2020
```
2121
While(i < 10) do i++

_build/reference/694-math-diffeqn.markdown

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
55
Solving first-order differential equations using Runge-Kutta method.
66

7-
dy/dx = f(y,x) with start condition: y(x = x0) = y0
7+
- `expr` : f(y,x) = dy/dx with start condition: y(x = x0) = y0
8+
- `x0`, `y0` : initial x, y
9+
- `xf` : final x
10+
- `yf` : result
11+
- `maxseq` : equivalent to precision
12+
- `maxerr` : maximum allowed error
13+
- `errcode` : 0 for success; otherwise calculation error
814

9-
x0,y0 = initial x,y
10-
xf = final x
11-
errcode = 0 for success; otherwise calculation error
12-
yf = result
15+
### Example 1
1316

1417
```
1518
' Solving dy/dx = 7*y^2 * x^3 with start condition y(2) = 3
@@ -38,6 +41,8 @@ if(errcode != 0) then
3841
endif
3942
```
4043

44+
### Example 2
45+
4146
```
4247
' Defining the differential equation for a stiffness system
4348
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# DETERM
22

3-
> DETERM (A[, toler])
3+
> D = DETERM (A [, toler])
44
5-
Determinant of A. toler = tolerance number. the absolute value of the lowest acceptable number. default = 0.
5+
Determinant of `A`. `toler` is the tolerance number. It is equivalent to the absolute value of the lowest acceptable number. Default value is `0`.
6+
7+
### Example
68

79
```
810
A = [ 0, 1, 2; 3, 2, 1; 1, 1, 0]
9-
print determ(A)
11+
print determ(A) ' Output: 3
1012
```
1113

_build/reference/777-string-disclose.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if `pairs` and `ingnore-pairs` are not given, the following default pairs and i
1515
| { | {} | " " ' ' |
1616
| < | <> | " " ' ' |
1717

18-
## Example 1: Disclose default pairs
18+
### Example 1: Disclose default pairs
1919

2020
```
2121
s = "(abc)"

0 commit comments

Comments
 (0)