Skip to main content

Command Palette

Search for a command to run...

Using Sublime Text with FASTBuild

Updated
2 min read

Using Sublime Text with FASTBuild

8 Nov

Written By Roderick Kennedy

Sublime text can be used to run FASTBuild, with this build script. Save this as "FASTBuild.sublime-build", in your user AppData\Roaming\Sublime Text 3\Packages\User directory (or Mac/Linux equivalent location).

{ "cmd": ["C:/Simul/master/Simul/External/FASTBuild/FBuild.exe","-config","$file"] ,"file_regex": "(.)\((.),(.)\): FASTBuild (Error .)$" ,"selector": "source.bff" }

By using the selector "source.bff", it should match up automatically with the syntax (below), but I've not quite figured this part out yet. Here's a preliminary Sublime Text syntax for FASTBuild. Call it "FASTBuild.sublime-syntax" and save it in the same directory.

%YAML 1.2

name: FASTBuild file_extensions: [bff] scope: source.bff

contexts: comments:

  • include: scope:source.c#comments

    instring:

  • match: "[^\"]" scope: string
  • match: \" pop: true scope: string strings:
  • match: \" push: instring scope: string

    inquotes:

  • match: "[^']" scope: string
  • match: "'" pop: true scope: string quotes:
  • match: "'" push: inquotes scope: string

    variables:

  • match: "\.(\w*)" scope: keyword preprocessor-includes:
  • match: "^\s(#\s\binclude)\b" captures: 1: keyword.control.include.c++ preprocessor-import:
  • match: "^\s(#)\s\b(import)\b" scope: keyword.control.c

    preprocessor:

  • include: scope:source.c#incomplete-inc
  • include: preprocessor-macro-define
  • include: scope:source.c#pragma-mark
  • include: preprocessor-includes
  • include: preprocessor-import global:
  • include: comments
  • include: preprocessor
  • include: strings
  • include: quotes
  • include: variables main:
  • include: global
  • match: \b(if|else|for|while)\b scope: keyword.control.c

    Roderick Kennedy

Using Sublime Text with FASTBuild

8 Nov

Written By Roderick Kennedy

Sublime text can be used to run FASTBuild, with this build script. Save this as "FASTBuild.sublime-build", in your user AppData\Roaming\Sublime Text 3\Packages\User directory (or Mac/Linux equivalent location).

{ "cmd": ["C:/Simul/master/Simul/External/FASTBuild/FBuild.exe","-config","$file"] ,"file_regex": "(.)\((.),(.)\): FASTBuild (Error .)$" ,"selector": "source.bff" }

By using the selector "source.bff", it should match up automatically with the syntax (below), but I've not quite figured this part out yet. Here's a preliminary Sublime Text syntax for FASTBuild. Call it "FASTBuild.sublime-syntax" and save it in the same directory.

%YAML 1.2

name: FASTBuild file_extensions: [bff] scope: source.bff

contexts: comments:

  • include: scope:source.c#comments

    instring:

  • match: "[^\"]" scope: string
  • match: \" pop: true scope: string strings:
  • match: \" push: instring scope: string

    inquotes:

  • match: "[^']" scope: string
  • match: "'" pop: true scope: string quotes:
  • match: "'" push: inquotes scope: string

    variables:

  • match: "\.(\w*)" scope: keyword preprocessor-includes:
  • match: "^\s(#\s\binclude)\b" captures: 1: keyword.control.include.c++ preprocessor-import:
  • match: "^\s(#)\s\b(import)\b" scope: keyword.control.c

    preprocessor:

  • include: scope:source.c#incomplete-inc
  • include: preprocessor-macro-define
  • include: scope:source.c#pragma-mark
  • include: preprocessor-includes
  • include: preprocessor-import global:
  • include: comments
  • include: preprocessor
  • include: strings
  • include: quotes
  • include: variables main:
  • include: global
  • match: \b(if|else|for|while)\b scope: keyword.control.c

    Roderick Kennedy

More from this blog

Roderick's Debug Diary

58 posts

https://mastodon.social/@rvkennedy