Notepad++ 自定义语言突出显示 [英] Notepad++ Custom Language Highlighting

查看:96
本文介绍了Notepad++ 自定义语言突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一种特定的语言(它的私有和封闭源代码),我正在 Notepad++ 中编写代码突出显示.我以前从未做过这样的事情......所以,在大多数情况下,我一无所知.

I have a specific language (its private, and closed source) that I'm writing code highlighting for in Notepad++. I've never done anything like this before... so, for the most part, I'm clueless.

有一堆关键字,我已经想出了如何实现它们,但是字符串用方括号([])表示,而不是正常报价.如何在 XML 文件中将它们注册为字符串?

There are a bunch of keywords, and I've figured out how to implement those, but the strings are denoted by square brackets ([ and ]) instead of normal quotes. How do I register those as strings in the XML file?

另外一点,语言严重依赖递归和嵌套;有没有办法说方括号的级别 1 是这种颜色,级别 2 是这种颜色,等等......"?

Another thing, the language relies heavily on recursion and nesting; is there some way to say "Level 1 of the square brackets is this color, level 2 is this color, etc..."?

推荐答案

有一个有用的 帮助页面 解释了如何使用 GUI 为 Notepad++ 定义自定义语言.正如 Alex K 在上面的评论中所指出的,设置字符串分隔符的选项似乎位于 Operators 选项卡中的 Delimiters 框中.不过,它看起来并不支持不同级别嵌套的不同颜色.

There's a useful help page that explains how to use the GUI to define a custom language for Notepad++. As Alex K noted in a comment above, the option for setting string delimiters appears to be in the Delimiters boxes in the Operators tab. It doesn't look like it supports different colours for different levels of nesting, though.

这篇关于Notepad++ 自定义语言突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆