您的位置:首页 > 编程语言 > Lua

在Ultraedit中编辑lua代码,并使其支持语法高亮

2012-02-03 17:32 323 查看
这篇文章参考了前人的一些做法,只不过对于新版ultraedit 17做了一些修改,原文的地址是http://www.cppblog.com/tuuzed/archive/2008/12/27/70516.html

 

 

ultraedit 17已经将字典文件集中存放到一个文件夹下而不是使用原来的一个字典,只需要将lua字典文件拷贝到C:\Users\XXXXXXXXXXX\AppData\Roaming\IDMComp\UltraEdit\wordfiles下(注意这个目录是配置中可以改变的)。

 

我自己使用的字典文件内容如下(保存为lua.uew):

/L20"Lua" Line Comment = -- Block Comment On = [[ Block Comment Off = ]] String Chars = "' Escape Char = \ File Extensions = LUA WDML BIN
/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"
and
break
do
else
elseif
end
function
if in
local
nil not
or
repeat return
then
until
while
/C2
abs acos appendto ascii asin assert atan atan2
call ceil clock collectgarbage copytagmethods cos
date deg dofile dostring
error execute exit
false find floor foreach foreachvar format frexp
getbinmethod getenv getglobal gettagmethod gfind gmatch gsub
insert ipairs
ldexp log log10
match max min mod
newtag next nextvar
os
pairs print
rad random randomseed rawgetglobal rawgettable rawsetglobal rawsettable read
readfrom remove rename
seterrormethod setglobal setlocale settag settagmethod sin sqrt strbyte sub
strchar strfind string strlen strlower strrep strsub strupper
table tag tan tmpname tonumber tostring true type
write writeto
/C3
$debug
$else
$end
$endinput
$if
$ifnot
$nodebug
/C4
PI
_INPUT _OUTPUT _STDERR _STDIN _STDOUT
/C5
+
-
*
// /
^
<
>
=
~
%
.
:
/C6
;
,
(
)
{
}
[
]
/C7
cgi cgilua cgilua_url char2hexa chdir
dbluaerrorfb dblua_escape decode default_script
encodecgi encodetable escape
filetype
getvalue
hexa hexa2char html_mask
includehtml insertfield
lua_mask
maketable map mkurl
nopipe
preprocess
redirect relativeurl relative_url
saveluavar savestate script_path script_pdir script_vdir stateerrormethod
statefile stdin strsplit
unescape
/C8
DBClose DBExec DBOpen DBRow


 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息