fbp icon indicating copy to clipboard operation
fbp copied to clipboard

Syntax highlighting in editors ?

Open DjebbZ opened this issue 12 years ago • 5 comments

May not be the best palce to ask, but do you guys have syntax highlighting of fbp files in your favorite editors ? I'm using Sublime Text (2/3) and couldn't find an official fbp syntax highlighter. Would make life easier (although it's not top-priority and could be something made by the community).

DjebbZ avatar Aug 12 '13 15:08 DjebbZ

@bergie, who was it that made progress with this?

d4tocchini avatar Aug 16 '13 22:08 d4tocchini

Here is a vim FBP highlighter: https://github.com/ninegrid/vim-fbp

In action:

screenshot 2014-01-02 at 21 52 36

bergie avatar Jan 02 '14 20:01 bergie

I started on a syntax definition last night. It's a .tmLanguage so it should work with TextMate, Sublime, and Atom.

I'm putting some finishing touches to it and then going to figure out how to package it up.

Some screenshots from Sublime Text with the Tomorrow Night Eighties theme:

screen shot 2014-05-14 at 12 05 00

screen shot 2014-05-14 at 12 05 18

screen shot 2014-05-14 at 12 05 31

screen shot 2014-05-14 at 12 05 53

screen shot 2014-05-14 at 12 14 09

paulyoung avatar May 14 '14 16:05 paulyoung

The current version is slightly different to the above screenshots and also has support for exporting ports (including legacy exports).

For reference:

For anyone looking at the source code - the tmLanguage format is pretty cryptic, and isn't as sophisticated as something like PEG.js, so there's likely a better way to achieve what I've done so far. That said, it should work as expected.

If anyone has feedback or runs into problems, please create an issue for the .tmbundle since that's the source for everything else.

paulyoung avatar May 15 '14 07:05 paulyoung

FBP syntax highlighting rules for the ACE editor: https://github.com/johnrees/visualize/blob/37692009de167ca2b9864ca39d3d0a9ee12da6e5/browser/mode-fbp.js

bergie avatar Nov 16 '17 16:11 bergie