Sublime Forum

Custom Code Folding for LiveCode

#1

I use LiveCode and RevIgniter. The Textmate for LiveCode bundle works in Sublime text, so we get proper syntax highlighting; but I would like to add a number of code folding regions.

In LiveCode we use a lot of


command goMakeCoffee kauaiGold
  open KauaiGold bag of beans
  grind'em
  put generateHotWater() into pot
  put grinds in pot
  put brew into gVariableCup
  drinkAndGetGoing
end goMakeCoffee

command drinkAndGetGoing
   if hot then 
      sip slowly
    else
     chugalug
    end if
end drinkAndGetGoing


function generateHotWater  
  get filteredWater
  put on burner
  turn burner on high
  return hotWater
end generatHotWater

So I want to be able to fold regions where the first line begins with keyword(s)
command
function
and ends with
“end”

Is there a way to do this?

0 Likes