BBC BASIC Syntax
SublimeText syntax mode for BBC BASIC files
Details
Installs
- Total 379
- Win 229
- Mac 77
- Linux 73
May 9 | May 8 | May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
Linux | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
SublimeText Syntax highlighting for textual BBC BASIC files
A SublimeText syntax definition for BBC BASIC text files to enable syntax highlighting. Although the keywords are complete for the BASIC V/VI versions used by RISC OS, it should also be suitable for earlier versions, as well as versions for other platforms.
Colouring
The syntax colouring recognises the keywords, and some of the language features.
The coloured features are:
- Comments, prefixed by
REM
. - Function and procedure declarations (and their end).
- Function and procedure invocations.
- Control and loop structures.
- Line number prefixes.
- BASIC style hex (
&xxx
) and binary (%bbb
) numbers. - CLI commands, prefixed by
*
at the start of a line.
Unsupported features:
- Inline assembly blocks.
- Understanding of the context.
File recognition
BBC BASIC files are usually given names with a suffix ,fd1
when stored on non-RISC OS filesystems. fd1
is the filetype number for Textual BASIC code. Non-RISC OS versions of
BBC BASIC use the extension .bbc
which is recognised by the syntax mode.
To force the use of the BBC BASIC mode for these files, it is recommended that the ApplySyntax package (or similar) be used to select the syntax mode.
The following configuration is suitable for use within ApplySyntax.sublime-settings
:
{
// BBC Basic using RISC OS naming convention and extension
"syntax": "BBCBASIC/BBCBASIC",
"rules": [
{"file_path": ".*(,fd1|\\.bbc)$"},
]
},
Install manually
- Place the
BBCBASIC.sublime-syntax
file inside the Sublime Text packages User folder (Preferences | Browse Packages...
) - Restart Sublime Text
Install with Package Control
- Install Package Control
- Run “Package Control: Install Package” command, find and install
BBC BASIC
package. - Restart Sublime Text if necessary
License
This package is licensed under the MIT License.