Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Custom syntax colouring in BBEdit

Discussion in 'Wish List' started by matthewminer, Aug 10, 2007.

  1. matthewminer


    Aug 29, 2005
    I use BBEdit (fantastic program, tell your friends) to edit scripts in Unity. It works well, but I would like to have more Unity-esque syntax colouring in addition to the regular JavaScript syntax colouring. Unitron, for example, colours "GameObject" appropriately when you type it. It would be simply smashing to have this occur in BBEdit.

    I'm not sure how easy it is to write custom language syntax colouring schemes for BBEdit, but perhaps some intrepid programmagician knows their way around language modules. I may yet buckle down and write one myself, if there's enough support from other BBEdit users to warrant doing so.
  2. NCarter


    Sep 3, 2005
    The simplest solution is to make a 'codeless language module'. This is just an easily editable plist. For example, here are modules I made last year for C# and Shaderlab. To use them, unzip the archive and put the files in ~/Library/Application Support/BBEdit/Language Modules/.

    Unfortunately, codeless language modules only have rudimentary highlighting support (at least for versions of BBEdit prior to 8.5, which is where I stopped updating). You can write your own non-codeless language modules in C to get a little bit more flexibility, but I didn't think it was worth the effort. I just switched to TextMate instead, which allows you to make very flexible language definitions by writing hairy regexes(!).

    Anyway, hopefully the examples above might give you some idea of where to start. :)
  3. andeeeee


    Jul 19, 2005
    The attached file is a codeless language module for BBEdit that colours Unity JavaScript. I imagine it won't be quite as good as the built-in JS mode (the built-in/coded modes can be pretty clever) but it does colour keywords, scan functions, etc.

    Attached Files:

  4. marty


    Apr 27, 2005
    Heya, Andeeee!

    BBEdit 10 just came out and looks kinda like a good Unitron-replacement.

    Do you (or anyone out there) have an up-to-date version of this very nice and labriously-assembled Unity Javascript BBEdit codeless language module?