www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - SciTE api file, keywords and functions highlight file for D

Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: 8bit

SciTe is my fav text editor.

how to use SciTe api file, keywords and functions highlight file for D:
1 put d.api to SciTe setup dir
2 put d.keywords.properties to SciTe setup dir
3 to use d.api, add bellow to cpp.properties

    file.patterns.d=*.d
    # use cpp lexer
    lexer.$(file.patterns.d)=cpp
    word.chars.d=$(chars.alpha)$(chars.numeric)._#$
    word.characters.$(file.patterns.d)=$(word.chars.d)
    # Specify api file 
    # 自动提示文件位置d.api是d语言关键词,函数名,d.user.calltips.api是自定义自动提示
    # from:  http://bbs.yidabu.com/forum-10-1.html
    api.$(file.patterns.d)=$(SciteDefaultHome)\api\d.api;$(SciteDefaultHome)\api\d.user.calltips.api
    # 自动提示的字符范围,加上.就能支持std.c.windows这样的自动提示
    calltip.cpp.word.characters=$(word.chars.d)
	
4 to use d.keywords.properties, add bellow to cpp.properties:
    # Import the seperate d.keywords.properties file containing D language info
(based on script by yidabu)
    import d.keywords

    # D language keywords style 5
    keywords.$(file.patterns.d)=$(d.keywords.keywords)

    # keywords2 is for highlighting user defined keywords or function calls or
similar
keywords2.$(file.patterns.d)=$(d.keywords.functions)

    # Keyword style
    style.cpp.5=fore:#0000FF,bold
    # Keywords2, functions style of D
   style.cpp.16=fore:#000090,bold,italics

-- 
yidabu <yidabu gmail.com>
D forum in china:
http://bbs.yidabu.com/forum-10-1.html
Apr 19 2007