Git Product home page Git Product logo

sublimetext-bbcbasic-syntax's Introduction

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.

sublimetext-bbcbasic-syntax's People

Contributors

gerph avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

sublimetext-bbcbasic-syntax's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.