Hello,
I have made a small edit to the Lua plist file.
Currently the Lua bundle does not recognize "local function foo ()" as the beginning of a fold. In Lua, "function foo() end" is actually syntactic sugar for "foo = function() end", thus functions can be made local with "local function foo ()". I have edited the plist file so that it recognizes "local function" as a fold start, however because I am new to Textmate I don't know how to match whitespace characters. The space should probably be matched with that instead.
greetings,
Tom
On Dec 3, 2007, at 7:38 PM, Tom Wieland wrote:
Currently the Lua bundle does not recognize "local function foo ()" as the beginning of a fold. In Lua, "function foo() end" is actually syntactic sugar for "foo = function() end", thus functions can be made local with "local function foo ()".
Committed, thanks!
I have edited the plist file so that it recognizes "local function" as a fold start, however because I am new to Textmate I don't know how to match whitespace characters. The space should probably be matched with that instead.
It uses standard regular expressions, so the match would be \s+ (one or more whitespace chars).
See: http://macromates.com/textmate/manual/regular_expressions#syntax_oniguruma