Syntax-Highlighting?

after watching nice introductory tutorials on Tinderbox Programming and HTML exporting I was thinking, would it be nice to see Syntax-Highlighting integrated into the editor ?

This is not a bad idea, but then again let’s keep in mind that there are a lot of tools that do this, e.g. BBEDIT, and Eastgate has a small team. I believe their strategy is to let other tools do what they do best and have Tinderbox do what it does best.

To this end, for longer action code, personally, I use BBEDT. It really helps since BBEdit has larger real estate to work with.


Image: BBEDIT Screenshot of Becker’s daily journal pTimeTracker prototype Rule in BBEDIT

Side note: If you want to create an extra line in a Rule or Edict box when editing action code use ⌥ ENTER. This will add a line. Makes it easier to see your code (again, using an external editor, however, at least for me, is a lot easier).

1 Like

As a general rule, whenever I find myself wishing for syntax highlighting or needing a bigger space for a complicated rule, I ask myself whether there’s a simpler process.

A few smaller and simpler agents can often do the work of a complex rule, while making your intent clearer and easier to document.

1 Like

Totally agree! In my experience, however, getting to this point can sometimes take a few iterations. I’ve found that I think I want something to work one way, I get it to work. Then I find that It was not exactly what I expected, or I did not really need it, or there is another and simper way. As @mwra would say, its all part of the “incremental formalization” process.

Integrating syntax highlighting into the editor for Tinderbox Programming and HTML exporting could indeed enhance the user experience. Syntax highlighting helps visually distinguish different elements of code, making it easier for users to read and understand the structure of their scripts or markup.

Here are some potential benefits of integrating syntax highlighting:

  1. Improved Readability: Syntax highlighting makes code more readable by using different colors or styles for different elements such as keywords, variables, and comments.
  2. Error Identification: It can help identify syntax errors more quickly by highlighting portions of code that may be causing issues.
  3. Enhanced Productivity: Users can work more efficiently and confidently with highlighted syntax, reducing the likelihood of errors.

If you’re suggesting this feature to the developers or maintainers of Tinderbox or a related tool, you might want to provide specific examples of how syntax highlighting could be beneficial in the context of the tasks you’re performing. Additionally, consider checking if there’s an existing feature request or forum discussion related to this enhancement, as it could already be under consideration.
Thanks for sharing

[admin edit: spam link deleted]

Thank you

As I’ve had to delete a blatant spam link it isn’t clear if this is a genuine post. Syntax highlighting was first introduced in v9.0.0 (Dec 2021), both a built-in method for Action Code (UI input boxes and notes using the Action built-in prototype).

Separately, the same version introduced user defined syntax highlighting got other formats.

A forum user, @Pete, has kindly contributed a BBEdit code-colouring configuration for Tinderbox Action Code—and just posted an update for the current Tinderbox v9.7.0 (see).

Whilst it might seem useful to have the same for Export code, any but the most trivial templates tend to mix action and export code adding to the identification of the type of code in that position. The Text/export pane does colour-code literal text vs evaluated export code vs included (transcluded) content which can also show how export code is working.

To me it looks like an obvious AI response. The tone, or register, is completely off for a forum response (particularly one responding to a three year old post.

The user has only been posting for a few hours. One of their other two posts is equally unnatural in context:

I recommend checking the official Summerfest website, social media channels, or contacting the event organizers directly for the most accurate and up-to-date information on Summerfest 2023. Summerfest2023 date? - #4 by gregbowers

That “I recommend” jars – it’s too stilted for the context. And why would a human recommend checking the date of an event which finished six months ago?

I could be wrong, of course, in which case I apologise… but it looks like someone is using the forum to generate AI responses.

1 Like

Oof. AI spam? You’d think our robot overlords could use their powers to greater good. Still. it caused me to make a useful summary, I hope, of where we are with highlighting.

2 Likes

I concur with this - especially since the profile reads like a LinkedIn self-promotion blurb

2 Likes