Coder Social home page Coder Social logo

fb-mode's Introduction

FreeBASIC mode for GNU Emacs

This is an Emacs major mode for the FreeBASIC programming language. It's functional, fairly bug-free (except missing keywords), but always a work in progress. It is written from scratch, so may not follow certain conventions.

Installing

require it after downloading it and placing it in your load-path. E.g. in your .emacs:

(add-to-list 'load-path "/path/to/fb-mode")  ; Directory containing fb-mode.el
(require 'fb-mode)

You likely will want to customise the fb-emph-face (used for : and _ tokens - I couldn't find an existing suitable face) for your colour theme.

Features

  • Syntax highlighting
    • Declared variable names are highlighted, thanks to parsing of variable declarations and sub/function declarations and header lines instead of simplistic keyword highlighting
  • Indentation
    • Full support for lines continued with _
    • Amount of indentation is controlled by the fb-indent-level variable
  • Commenting/uncommenting, and fill-paragraph support for comments
  • C-c C-h to lookup a symbol/keyword (default under point) in the manual in a web browser tab (note, doesn't handle ambiguous keywords)
    • Supports most tokens like "*", "..." and special cases like "line input #" if you enter them manually
  • F5 to run compile, with a suitable default command (fbc <file>, make or scons)
    • compile-mode support for fbc error/warning messages so you can jump to the line
  • beginning-of-defun/end-of-defun (C-M-a/C-M-e) support
  • C-M-j to split the current line at point (possibly in middle of a string or comment), adding a _ line continuation and indenting.

Not yet included

  • Syntax highlighting of builtin functions and types; some keywords like data are also missing.
  • Keyword/builtin completion
  • Jumping to definitions (tags)
  • Menubar items

Alternative

freebasic-mode by z80lives is an older, simpler Emacs mode for FreeBASIC. The two modes are fairly distinct in their feature sets.

freebasic-mode highlights based on a near-complete (though out of date) list of all FB keywords and builtin functions. It has functions/keys to compile and (Unix only) run the file, and menu bar items. However, it currently has no support for line continuations, minimal support for multiline comments (can only highlight them), and suffers various bugs in syntax highlighting and indentation.

fb-mode's People

Contributors

rversteegen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.