ICSharpCode.TextEditor添加ini和python支持

6 篇文章 0 订阅

 INI-Mode.xshd

<?xml version="1.0"?>
<SyntaxDefinition name = "INI" extensions = ".asp;.aspx;.asax;.asmx" extends = "HTML">

  <RuleSets>
    <RuleSet ignorecase = "true">
      <Span name = "INICode" rule = "INI2"  bold = "false" italic = "false" color = "Black" stopateol = "false">
        <Begin></Begin>
      </Span>

    </RuleSet>

    <RuleSet name="INI2" ignorecase = "true">      
      <Span name="String" stopateol="true" color="Black" escapecharacter=";">
        <Begin>=</Begin>
      </Span>
      <Span name = "LineComment" bold = "false" italic = "false" color = "Green" stopateol = "true">
        <Begin>;</Begin>
      </Span>
      <Span name = "COMMENT2" bold = "false" italic = "false" color = "Blue" stopateol = "true">
        <Begin>[</Begin>
        <End>]</End>
      </Span>
    </RuleSet>
  </RuleSets>
</SyntaxDefinition>

 Python.xshd

<SyntaxDefinition name="Python" extensions=".py">
	
	<Properties>
		<Property name="LineComment" value="#"/>
	</Properties>
	
	<Digits name="Digits" color="DarkBlue"/>

	<RuleSets>
		<RuleSet ignorecase="false">
			
			<Delimiters>()[]{}@,:.`=;+-*/% &amp;|^&gt;&lt;</Delimiters>
			
			<Span name="DocComment" color="Green">
				<Begin>"""</Begin>
				<End>"""</End>
			</Span>
			
			<Span name="SingleQuoteDocComment" color="Green">
				<Begin>'''</Begin>
				<End>'''</End>
			</Span>

			<Span name="LineComment" stopateol="true" color="Green">
				<Begin>#</Begin>
			</Span>
			
			<Span name="String" stopateol="true" color="Blue" escapecharacter="\">
				<Begin>"</Begin>
				<End>"</End>
			</Span>
			
			<Span name="Char" stopateol="true" color="Magenta" escapecharacter="\">
				<Begin>'</Begin>
				<End>'</End>
			</Span>
			
			<MarkPrevious bold="true" color="MidnightBlue">(</MarkPrevious>

			<KeyWords name="BuiltInStatements" bold="true" color="MidnightBlue">
				<Key word="assert"/>
				<Key word="del"/>
				<Key word="exec"/>
				<Key word="global"/>
				<Key word="lambda"/>
				<Key word="print"/>
			</KeyWords>
			
			<KeyWords name="ClassStatement" color="Blue" bold="true">
				<Key word="class"/>
			</KeyWords>
			
			<KeyWords name="ExceptionHandlingStatements" bold="true" color="Teal">
				<Key word="except"/>
				<Key word="finally"/>
				<Key word="raise"/>
				<Key word="try"/>
			</KeyWords>
			
			<KeyWords name="FunctionDefinition" bold="true" color="Blue">
				<Key word="def"/>
			</KeyWords>
			
			<KeyWords name="Imports" bold="true" color="Green">
				<Key word="import"/>
				<Key word="from"/>
			</KeyWords>
			
			<KeyWords name="IterationStatements" bold="true" color="Blue">
				<Key word="for"/>
				<Key word="in"/>
				<Key word="while"/>
			</KeyWords>
			
			<KeyWords name="JumpStatements" color="Navy">
				<Key word="break"/>
				<Key word="continue"/>
				<Key word="yield"/>
				<Key word="return"/>
			</KeyWords>
		
			<KeyWords name="OperatorStatements" bold="true" color="DarkCyan">
				<Key word="and"/>
				<Key word="as"/>
				<Key word="is"/>
				<Key word="not"/>
				<Key word="or"/>
			</KeyWords>
			
			<KeyWords name="PassStatement" color="Gray">
				<Key word="pass"/>
			</KeyWords>			
		
			<KeyWords name="SelectionStatements" bold="true" color="Blue">
				<Key word="elif"/>
				<Key word="else"/>
				<Key word="if"/>
			</KeyWords>
		
			<KeyWords name="WithStatement" color="DarkViolet">
				<Key word="with"/>
			</KeyWords>
		</RuleSet>
	</RuleSets>
</SyntaxDefinition>

SyntaxModes.xml

<SyntaxModes version="1.0">
	<Mode file       = "ASPX.xshd"
	      name       = "ASP/XHTML"
	      extensions = ".asp;.aspx;.asax;.asmx"/>
	
	<Mode file       = "BAT-Mode.xshd"
	      name       = "BAT"
	      extensions = ".bat"/>
	
	<Mode file       = "Boo.xshd"
	      name       = "Boo"
	      extensions = ".boo"/>
	
	<Mode file       = "Coco-Mode.xshd"
	      name       = "Coco"
	      extensions = ".atg"/>
	
	<Mode file       = "CPP-Mode.xshd"
	      name       = "C++.NET"
	      extensions = ".c;.h;.cc;.C;.cpp;.hpp"/>
	
	<Mode file       = "CSharp-Mode.xshd"
	      name       = "C#"
	      extensions = ".cs"/>
	
	<Mode file       = "HTML-Mode.xshd"
	      name       = "HTML"
	      extensions = ".htm;.html"/>
	
	<Mode file       = "Java-Mode.xshd"
	      name       = "Java"
	      extensions = ".java"/>
	
	<Mode file       = "JavaScript-Mode.xshd"
	      name       = "JavaScript"
	      extensions = ".js"/>
	
	<Mode file       = "Patch-Mode.xshd"
	      name       = "Patch"
	      extensions = ".patch;.diff"/>
	
	<Mode file       = "PHP-Mode.xshd"
	      name       = "PHP"
	      extensions = ".php"/>
	
	<Mode file       = "Tex-Mode.xshd"
	      name       = "TeX"
	      extensions = ".tex"/>
	
	<Mode file       = "VBNET-Mode.xshd"
	      name       = "VBNET"
	      extensions = ".vb"/>
  
  <Mode file = "TSQL-Mode.xshd"
        name = "TSQL"
        extensions = ".sql"/>

  <Mode file = "INI-Mode.xshd"
        name = "INI"
        extensions = ".ini"/>

  <Mode file = "Python.xshd"
        name = "Python"
        extensions = ".py;.pyd"/>
	
	<Mode file       = "XML-Mode.xshd"
	      name       = "XML"
	      extensions = ".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;.xshd;.wxs;.wxi;.wxl;.proj;.csproj;.vbproj;.ilproj;.booproj;.build;.xfrm;.targets;.xaml;.xpt;.xft;.map;.wsdl;.disco"/>
</SyntaxModes>

ICSharpCode.TextEditor下载链接

SharpDevelop_3.2.1.6466_Source.zip

链接: https://pan.baidu.com/s/1kpdUgM5RRD7mOsVBPEgJRA 提取码: z8gb

ICSharpCode.TextEditor.dll

链接: https://pan.baidu.com/s/1FaK1bkGP3Gmf5Q4fhvH3uA 提取码: b5z4 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

@David Liu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值