LSL Syntax Highlighting

Seems I’m intent on working more on the back-end of my site than posting something. Oh well, I’ve developed an GeSHi LSL highlighter using the official colours from the internal SL code editor, so I can do stuff like insert code like this:

default
{
    touch_start(integer total_number)
    {
        if(llSameGroup(llDetectedKey(0))) {
            integer items = llGetInventoryNumber(INVENTORY_ALL);
            list itemlist;
            string nametemp;
            integer i = 0;
            for(i=0;i < items;i++) {
                nametemp = llGetInventoryName(INVENTORY_ALL, i);
                if(nametemp != llGetScriptName()) itemlist += [nametemp];
            }
            llGiveInventoryList(llDetectedKey(0), llGetObjectName(), itemlist);
        }
    }
}

I’ve had to add a CSS rule in the k2 stylesheets to make the background match the editor’s which is kind of annoying and not as good as you can see.

If you’re interested in nabbing this highlighter, throw some comments, I might post it up if there’s enough demand.

5 Responses to “LSL Syntax Highlighting”


  1. 1 Jarek Dejavu

    Hi! Great work! Can you send me the Geshi LSL extension please? I was about to do one myself for my website, but this might safe me a lot of work! Thank you in advance!

  2. 2 Hippy

    Oh man – I’m just putting together a wordpress install, and fell on your site thru google looking for LSL highlighting – your code would be appreciated – pls post it!

  3. 3 Samuel

    Also, the post above, I been looking for something like this for my WP blog too!

  4. 4 wow gold

    Sounds interesting. Thanks for info .I like You Now! (sounds weird.. should say I follow you Now!.. ) :)

  5. 5 JoEllen Loan

    Me and my friend were arguing about this the other day! Now I know that I was right. lol! I wish you lots of itching and short arms.

Leave a Reply

Powered by WP Hashcash