- 首先去Source Insight的官网下载ARM.CLF 文件:http://www.sourceinsight.com/public/languages/
- 导入ARM.CLF 文件:
打开 "Options"->"Preference"->"Languages"
- 设置关键字和属性
a) 新建个文本文件,保存以下内容
!, Delimiter
#, Delimiter
%, Delimiter
&, Delimiter
', Delimiter
(, Delimiter
), Delimiter
*, Delimiter
+, Delimiter
",", Delimiter
-, Delimiter
.align, Keyword
.ascii, Keyword
.BREAK, Keyword
.bss, Keyword
.byte, Keyword
.CODE, Keyword
.CONST, Keyword
.CONTINUE, Keyword
.CREF, Keyword
.data, Keyword
.DATA?, Keyword
.define, Keyword
.ELSE, Keyword
.ELSEIF, Keyword
.ENDIF, Keyword
.ENDW, Keyword
.ERR, Keyword
.ERRB, Keyword
.ERRDEF, Keyword
.ERRDEFI, Keyword
.ERRE, Keyword
.ERRIDNI, Keyword
.ERRNB, Keyword
.ERRNDEF, Keyword
.ERRNZ, Keyword
.fill, Keyword
.globl, Keyword
.IF, Keyword
.long, Keyword
.MODEL, Keyword
.NOCREF, Keyword
.quad, Keyword
.RADIX, Keyword
.REPEAT, Keyword
.STACK, Keyword
.text, Keyword
.UNTIL, Keyword
.UNTILCXZ, Keyword
.WHILE, Keyword
.word, Keyword
/, Delimiter
:, Delimiter
;, Delimiter
<, Delimiter
=, Delimiter
>, Delimiter
?, Delimiter
@CATSTR, Keyword
@INSTR, Keyword
@SIZESTR, Keyword
@SUBSTR, Keyword
define, Keyword
elif, Directive
else, Directive
endif, Directive
if, Directive
ifdef, Directive
defined, Directive
ifndef, Directive
include, Keyword
pragma, Keyword
undef, Keyword
b) 保存完后,将关键字导入:
点"Options"->"Preference"->"Languages"->"ARM Assembly"->"keywords" ,然后按照以下图示导入:
- 设置"Comments and Ranges"
a) 双击"ARM Assembly",进入Custom Parsing,如图所示添加注释定义:
b) 设置"Custom Parsing"
\([A-Za-z0-9_]+\)=.
^\([_A-Za-z][A-Za-z0-9_]+\):*
- 添加文件类型
点击"Options"->"Document Options"
注意:将别的地方File filter 有关.S .s删除,不然显示会有问题
最后点击Close即可,效果图如下: