jQuery IntelliJ 社区版:Javascript 语法高亮

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18661145/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 22:10:19  来源:igfitidea点击:

IntelliJ Community Edition: Javascript syntax highlighting

javascriptjqueryintellij-ideasyntax-highlighting

提问by MegaMatt

I'm using IntelliJ IDEA 12 Community Edition, and am trying to set the syntax coloring for Javascript files. When I choose File > Settings > IDE Settings > Editor > Colors & Fonts, Javascript is not an option in the list. Is this a limitation of the Community Edition IDE, or am I missing something? The others I need are listed, like Java and HTML, but Javascript is missing from the list.

我正在使用 IntelliJ IDEA 12 社区版,并尝试为 Javascript 文件设置语法着色。当我选择文件 > 设置 > IDE 设置 > 编辑器 > 颜色和字体时,Javascript 不是列表中的一个选项。这是社区版 IDE 的限制,还是我遗漏了什么?列出了我需要的其他内容,如 Java 和 HTML,但列表中缺少 Javascript。

Thanks.

谢谢。

采纳答案by CrazyCoder

JavaScript support is supported in Ultimate Edition, but not in Community Edition.

终极版支持JavaScript ,但社区版不支持

For the basic syntax highlighting you can try the TextMate Bundles Support plug-in. See this documentfor the setup instructions (it's for PhpStorm, but instructions for IntelliJ IDEA would be the same).

对于基本语法突出显示,您可以尝试TextMate Bundles Support 插件。有关设置说明,请参阅此文档(适用于 PhpStorm,但适用于 IntelliJ IDEA 的说明是相同的)。

回答by Judith

The TextMate Bundles Support plug-in in not enough. You also need specific language bundles.

TextMate Bundles Support 插件还不够。您还需要特定的语言包。

  1. install and enabled the TextMate bundle support plugin in IntelliJ
  2. Download the specific language bundles and unzip them somewhere where you find them, e.g., TypeScript, Shell Script TextMate Bundle
  3. Open the Settings/Preferences dialog, got to Editor and select TextMate Bundles
  4. Click on the + on the right side and choose the desired bundle from 2. on your hard disk. Then it should appear in the list of recognized bundles.
  5. Extension conflicts might appear: Click on "Show details". If you want to use the new syntax highlighting click on "unregister native file type".
  1. 在 IntelliJ 中安装并启用 TextMate 捆绑支持插件
  2. 下载特定的语言包并将它们解压到你能找到它们的地方,例如TypeScriptShell Script TextMate Bundle
  3. 打开设置/首选项对话框,进入编辑器并选择 TextMate Bundles
  4. 单击右侧的 +,然后从硬盘上的 2. 中选择所需的捆绑包。然后它应该出现在已识别捆绑包的列表中。
  5. 可能会出现扩展冲突:单击“显示详细信息”。如果要使用新的语法突出显示,请单击“取消注册本机文件类型”。

A detailed explanation with screenshots can be found here

可以在此处找到带屏幕截图的详细说明

回答by AndroidDev

Use Visual Studio Code for Javascript support when using IntelliJ Community Edition. It's free and has all the support you would get for the paid version of IntelliJ Ultimate.

使用 IntelliJ 社区版时,使用 Visual Studio Code 来支持 Javascript。它是免费的,并且拥有您为 IntelliJ Ultimate 付费版本获得的所有支持。

回答by sparkyspider

Or buy it for $149 (personal ultimate edition). I've been buying it since 2013 and find it far superior to XCode. This is just my personal opinion though. Download a trial and see how you like it!

或者以 149 美元的价格购买(个人终极版)。我从 2013 年开始购买它,发现它远远优于 XCode。不过这只是我个人的看法。下载试用版,看看您喜欢它!

Pricing: https://www.jetbrains.com/idea/buy/#personal?billing=yearly

定价:https: //www.jetbrains.com/idea/buy/#personal?billing =yearly

Trial: https://www.jetbrains.com/idea/download/

试用:https: //www.jetbrains.com/idea/download/

ps: I'm not endorsed or affiliated with Jetbrains. Just a fan.

ps:我不认可或隶属于 Jetbrains。只是个粉丝。