我算得上?UltraEdit 的铁杆用户啦Q虽然是 D 版用?)Q,所以写 Lua E序当然?UltraEdit 啦!?UltraEdit 支持 Lua 的语法高亮很单,?UE 的官|?/a>Q下?Lua 的语法文?/a>集成在自带的语法高亮文g里就可以啦?/p>
但是 UE 官网上这个语法文件貌似比较旧Q是 02 q?8 月发布的Q块注释居然用的?#8220;[[”?#8220;]]”Q?#8220;Block Comment On = [[ Block Comment Off = ]]”。于是手工改?#8220;Block Comment On = –[[ Block Comment Off = –]]”保存Q结果发现行注释“–”是可以正显C的Q但是块注释只能显C快注释开始标记所在的那一行。貌似是 UE ?bugQ估计跟行注释有冲突Q因法文仉是这么写?#8220;Line Comment = ?Block Comment On = –[[ Block Comment Off = –]]”。试了一下把行注释放在块注释后面也不行,开?GoogleQ结果在 UE 的论坛上扑ֈ?a target="_blank" _fcksavedurl="http://www.ultraedit.com/index.php?name=Forums&file=viewtopic&t=3054">{案
?Lua 的语法文件第一行改成如下这个样子就可以啦:
QDoNeY注:哈,l于有了解决ҎQ下面听作者讲一下这一微小滴奥妙所在)
查了一?UE 的帮助文,上面?#8220;Block Comment On Alt”的描q是q样?#8220;The second set of block comments are in the form “Block Comment On Alt = ” and “Block Comment Off Alt = ” followed by up to five characters each that define the comment designators. If a Block Comment On Alt is defined but the Block Comment Off Alt is not defined the commenting will stop at the end of the line.”。看来块注释指示器有两种Q这个办法还真是比较巧妙Q但是要熟读 UE 文档才能想的到呀?br /> QDoNeY注:意即如果ultraedit在wordfile中对某个语言的语法着色只定义其Block Comment On Alt =作ؓW二U块注释的v始符P而不定义W二U块注释的结束符号Block Comment Off Alt =Q那么这个Block Comment On Alt 所定义的符号将会只注释掉从W号开始至行尾的部分,也就相当于换一个方法定义了行注释的W号了)
改完以后再看 Lua 代码里的块注释,现在已经可以完美昄?D