Apr 3, 2009

UltraEdit中加入Delphi的语法高亮显示

很多人非常喜欢用UltraEdit写代码,其功能强大相信很多人都是有目共睹的

然而ultra edit本身没有提供delphi的关键字语法高亮

(pascal就这样悲剧的被忽略了)

只找到c/c++/java/vb/jsp/mysql/python/ruby等等等等

没关系,可以配置的

依次打开 高级--配置--编辑器显示--语法高亮

在‘词语列表完整路径’里默认指向UltraEdit的语法高亮配置文件

比如我的电脑上为

C:\Documents and Settings\wybin\Application Data\IDMComp\UltraEdit\WORDFILE.UEW

注意,某些版本中可能是txt格式

点击打开,打开该文件

在末尾加入以下代码。

注意,开头的/L14数字是可以改的,取决于你的UE上已经配置了多少个语法高亮文件

{--------------------Beginning of the codes, do not copy this line------------------------------ }

/L14"Delphi" Nocase Line Comment = // Block Comment On = { Block Comment On Alt = (* Block Comment Off = } Block Comment Off Alt = *) Escape Char = ?String Chars = ' File Extensions = pas dpr
/Delimiters = #$&'()*+,-./;<>@[]^{}
/Function String = "%^{procedure^}^{function^}"
/Indent Strings = "begin" "repeat" "asm"
/Unindent Strings = "end" "until"
/C1"Reserved words"
array asm
begin
case class const constructor
destructor dispinterface do downto
else end except exports
file finalization finally for function
goto
if implementation inherited initialization inline interface
label library
nil
object of out
packed procedure program property
raise record repeat resourcestring
set string
then threadvar to try type
unit until
uses
var
while with
/C2"Directives"
absolute abstract assembler automated
cdecl contains
default dispid dynamic
export external
far forward
implements index
message
name near nodefault
overload override
package pascal private protected public published
read readonly register reintroduce requires resident
safecall stdcall stored
virtual
write writeonly
/C3"Operators"
*
+
-
// /
< <= <>
=
> >=
@
and as
div
in is
mod
not
or
shl shr
xor
/C4"Special symbols"
#
$
&
(
(.
)
,
.
.)
..
:
:=
;
[
]
^

{------------------------End of the codes, do not copy this line------------------------------ }

保存,就可以高亮DELPHI的关键字了

No comments:

Powered By Blogger