简体   繁体   English

如何在intellij中打开StringTemplate模板(* .st)的语法突出显示?

[英]How do I turn on syntax highlighting for StringTemplate templates (*.st) in intellij?

I have a string template file (.st) in IntelliJ that I would like to see syntax highlighting on. 我在IntelliJ中有一个字符串模板文件(.st),我希望高亮显示语法。 How can I turn this on? 我该如何打开呢? I can't seem to find it anywhere. 我似乎在任何地方都找不到。

Short answer is - you can't. 简短的答案是-您不能。

Someone must first implement a syntax highlighter plugin for the format. 必须首先为该格式实现语法突出显示插件。 The StringTemplate author, Terrence Parr, has begun work on such a plugin for String Template 4 but it does not support the older .st file format. StringTemplate的作者Terrence Parr已经开始为String Template 4制作这样的插件,但它不支持较早的.st文件格式。 I tried the plugin. 我尝试了插件。 Even on .stg files it is not ideal if you use a dark editor theme. 即使使用.stg文件,使用深色编辑器主题也不是理想选择。

The best solution is to use HTML syntax for *.st files. 最好的解决方案是对*.st文件使用HTML语法。 You can set this in Preference > File types > HTML. 您可以在“首选项”>“文件类型”>“ HTML”中进行设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为IntelliJ制作简单的计算器语法突出显示? - How to make a simple calculator syntax highlighting for IntelliJ? 如何在 IntelliJ 中更改匹配括号颜色的突出显示? - How do I change matching brackets color's highlighting in IntelliJ? IntelliJ Ruby语法高亮显示 - IntelliJ Ruby syntax highlighting 当窗口滚动时,如何使Intellij不会失去突出显示? - How do I make Intellij not lose highlighting when the window scrolls? 如何在Intellij中删除注释中的关键字突出显示? - How do I remove keyword highlighting within comments in Intellij? 如何让 IntelliJ CE 的 Java 语法高亮更加丰富多彩? - How can I make IntelliJ CE's Java syntax highlighting more colorful? 如何关闭IntelliJ IDEA编辑器中的装订线图标? - How do I turn off the gutter icons in the IntelliJ IDEA editor? Intellij - 这个奇怪的选择是什么,我该如何关闭它? - Intellij - what is this strange selection, and how do I turn it off? 如何在Intellij IDEA中关闭注释的错误验证? - How do I turn off error validation for annotations in Intellij IDEA? 如何使用IntelliJ(Kotlin)中的lateinit修饰符更改变量的语法突出显示规则? - How can I change syntax highlighting rules for a variable with the lateinit modifier in IntelliJ (Kotlin)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM