I have a custom script with a default output. I'd like to colorize errors, warnings and infos. There's a way to do that in Intellij products (IDEA, PhpStorm, PyCharm)?
It has been a while, but in case you are still interested, there is a new plugin for console colorizing: Grep Console.
Works nicely with Intellij 12.
Make sure you restart IntelliJ after installing the plugin. After you will see the plugin icon in the top left corner (white-red icon).
-
5
-
4A recent version of the config file for GrepConsole is available in my dotfiles. You can copy or symlink it to
$HOME/.IdeaIC12/config/options/GrepConsole.xml
. – JJD Sep 24 '13 at 12:32 -
@JJD cool, thanks. And thanks for turning a valid answer into a good one :) – kostja Sep 24 '13 at 13:18
-
1
-
1Support for ANSI coloring in the Grep Console plugin was removed in version 6.4 (feb 2017, IJ 2016+). – CMerrill Jun 21 '17 at 19:00
It's not supported right now (at least not for all the run configuration types). Please vote for:
- IDEA-23976 Add ability to color/highlight console output
- IDEA-69880 Support for colors in console output
Console output of the external tools is fixed to supports ANSI escape sequences to color text.
-
4Apparently supported in v14: youtrack.jetbrains.com/issue/IDEA-69880#comment=27-772011 – jordanpg Oct 20 '14 at 1:39
-
2@jordanpg This fix is for Java run configurations only – see youtrack.jetbrains.com/issue/IDEA-69880#comment=27-772027 – Piotr Dobrogost Feb 26 '15 at 14:17
Latest IntelliJ, PyCharm and PhpStorm have limited support for console output colorization.
Preferences > Editor > Colors & Fonts > Console Colors
-
11is there any documentation on how to use these? simply using the escape codes does not produce colors – Lucina Feb 2 '14 at 16:31
-
2@Buttons try to install "Grep Console" plugin and enable in its config page "Enable Ansi coloring" – dawez Apr 27 '14 at 7:39
-
5
-
Because of this support Grep Console does not handle ANSI colors anymore – github.com/krasa/GrepConsole/issues/39 – Piotr Dobrogost Feb 27 '15 at 8:26
-
1This supports only 8 ANSI colors. If you want support for 256 colors please vote on this issue – youtrack.jetbrains.com/issue/IDEA-137065 – Piotr Dobrogost Feb 27 '15 at 9:09
The colors configurations, mentioned in the other responses, work, if you run a regular application, if you set the following VM option:
-Dspring.output.ansi.enabled=ALWAYS
If you are using spring boot, use Spring Boot to start your application instead of general application. Color will show up. No need to do anything else. It works for me.
-
1Is this available on community edition? Doesn't show up for me. I have the Spring Assistant plugin installed. – Ixx Jun 5 '19 at 8:23
-
@Ixx it is not available for community edition only available for Unlimited edition. – Paras jain Aug 26 '20 at 8:04