UtraEdit 支持Lua高亮,网上已经有很多方法,但是都是基于相对老一点的
UE,在15.10版本中,UE支持Lua高亮的方法如下:
从网上Down下支持Lua的wordfiles,lua.uew
新建一个目录如D:\wordfiles,
将UE安装目录下的所有wordfiles文件都复制到D:\wordfiles,再将自己的lua.uew拷贝到此,
设置UE 高级-》配置-》编辑器显示-》语法高亮
将”文档的完整目录名称“一项改成D:\wordfiles
确定即可生效。
网上的Lua对require和for好像没有支持可以自己添加高亮关键字:
如下是我的Lua wordfiles文件:
/L20"Lua" Line Comment = -- Block Comment On = [[ Block Comment Off = ]] String Chars = "' Escape Char = \ File Extensions = LUA BIN
/Colors = 0,8421376,8421376,8421504,255,/Colors Back = 16777215,16777215,16777215,16777215,16777215,/Colors Auto Back = 1,1,1,1,1,/Font Style = 0,0,0,0,0,/Delimiters = ~!@%^&*()-+=|\/{}[]:;"'<> , .?/Function String 1 = "function[ ]++[a-zA-Z]*)"/Function String 2 = "function[ ]++([ a-zA-Z]*)"/Open Fold Strings = "function" "if" "while" "for"/Close Fold Strings = "end"/C1 "key words" Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0andbreakdoelse elseif endfunctionrequireif inlocalnil notorrepeat returnthenuntilwhilefor/C2 Colors = 255 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0abs acos appendto ascii asin assert atan atan2call ceil clock collectgarbage copytagmethods cosdate deg dofile dostringerror execute exitfalse find floor foreach foreachvar format frexpgetbinmethod getenv getglobal gettagmethod gfind gmatch gsubinsert ipairsldexp log log10match max min modnewtag next nextvarospairs printrad random randomseed rawgetglobal rawgettable rawsetglobal rawsettable readreadfrom remove renameseterrormethod setglobal setlocale settag settagmethod sin sqrt strbyte substrchar strfind string strlen strlower strrep strsub struppertable tag tan tmpname tonumber tostring true typewrite writeto/C3 Colors = 33023 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0$debug$else$end$endinput$if$ifnot$nodebug/C4 Colors = 32768 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0PI_INPUT _OUTPUT _STDERR _STDIN _STDOUT/C5 Colors = 4210816 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0+-*// /^<>=~%.:/C6 Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0;,(){ }[]/C7 Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0cgi cgilua cgilua_url char2hexa chdirdbluaerrorfb dblua_escape decode default_scriptencodecgi encodetable escapefiletypegetvaluehexa hexa2char html_maskincludehtml insertfieldlua_maskmaketable map mkurlnopipepreprocessredirect relativeurl relative_urlsaveluavar savestate script_path script_pdir script_vdir stateerrormethodstatefile stdin strsplitunescape/C8 Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0DBClose DBExec DBOpen DBRow