colorize LUA { SyntaxParser = 'SIMPLE'; color { { 'Normal', 'Lang_Default' }, { 'Number', 'Lang_DecimalNumber' }, { 'HexNumber', 'Lang_HexNumber' }, { 'Punctuation', 'Lang_Punctuation' }, { 'String', 'Lang_String' }, { 'Comment', 'Lang_Comment' }, { 'Command', 'Lang_Assembler' }, # assembler { 'CPreprocessor', 'Lang_Preprocessor' }, }; keyword 'Editor_Keywords' { 'and', 'break', 'do', 'else', 'elseif', 'end', 'false', 'for', 'function', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', 'return', 'then', 'true', 'until', 'while', 'global', 'constant', 'declare_globals', 'declare_global_constants', }; h_state 0 { 'Normal' } h_trans { 1, '-s', 'a-zA-Z_', 'Normal' } h_trans { 0, '<', '[[function', 'Command' } h_trans { 0, '<', 'end]]', 'Command' } h_trans { 2, '<', '--[[', 'Comment' } h_trans { 3, '<', '--', 'Comment' } h_trans { 4, '<', '"', 'String' } h_trans { 5, '<', '\'', 'String' } h_trans { 6, '<', '[[', 'String' } h_trans { 7, '', ']]', 'Comment' } h_state 3 { 'Comment' } h_trans { 0, '$', '', 'Comment' } h_state 4 { 'String' } h_trans { 0, '>', '"', 'String' } h_trans { 0, '$', '', 'String' } h_state 5 { 'String' } h_trans { 0, '>', '\'', 'String' } h_trans { 0, '$', '', 'String' } h_state 6 { 'String' } h_trans { 0, '>', ']]', 'String' } h_state 7 { 'Number' } h_trans { 0, '-S', '0-9', 'Normal' } h_trans { 0, '$', '', 'Normal' } } mode LUA: PLAIN { # Lua Mode FileNameRx = /\.\c{{LUA}|{MAP}}$/; HilitOn = 1; Colorizer = 'LUA'; AutoIndent = 1; IndentMode = 'PLAIN'; MatchCase = 0; Trim = 0; MultiLineHilit = 1; AutoHilitParen = 1; SaveFolds = 2; # save fold info at end of line CommentStart = ' --[['; CommentEnd = ']]'; RoutineRegexp = '^{function}'; }