下载高亮定义

Qt Creator KSyntaxHighlighting使用KSyntaxHighlighting语法高亮引擎和 Kate 语法定义。它自带了大多数常用的 Kate 定义,你还可以下载更多定义。有关定义文件的更多信息,请参阅使用语法高亮

应用语法定义文件明确指定的字体属性,如粗体、斜体、下划线或删除线。如果颜色可以通过Qt Creator 主题阅读,则会应用这些颜色。

记住首选定义

如果您打开编辑的文件有多个高亮定义,编辑器会要求您选择要使用的定义。

要保存选择,请选择Remember My Choice

要重置记住的定义,请转到首选项>Text Editor >Generic Highlighter ,然后选择Reset Remembered Definitions

文本编辑器首选项中的 "通用高亮显示器 "选项卡

下载定义

如果编辑器无法为您打开编辑的文件找到高亮定义,它会提示您下载其他高亮定义文件。选择Download Definitions 下载文件。

要查看已下载文件的相关信息,请打开常规信息视图。

忽略文件模式

要抑制特定文件模式的信息,请转到首选项>Text Editor >Generic Highlighter ,然后将该模式添加到Ignored file patterns

添加自己的定义

如果您编写了自己的语法定义文件,请在User Highlight Definition Files 中添加定义搜索路径。

要应用对定义文件所做的更改,请选择Reload Definitions

另请参阅 如何:编辑代码编辑模式

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.