ANSI Support Preferences

The following preferences can be set using the Opens the ANSI Support Preferences pageRun/Debug > Console > ANSI Support preference page.

Many console applications can interpret ANSI sequences to produce styled output.
The codes supported by these applications is not consistent, but the most common attributes supported include foreground and background colors, bold, italic, underline, invert.

See Wikipedia: ANSI escape code for details.

The Eclipse Console supports 16 colors / 256 colors / true-colors for foreground and background, color palettes, and attributes like bold, italic, underline, invert, conceal, strike, crossed-out, framed.

Only “CSI n m” (SGR, Select Graphic Rendition) control sequences are supported.
They set display attributes, but cannot be used to change the content of the output (erase actions, cursor positioning, scrolling).
Non-SGR sequences are not interpreted, but are recognized and hidden, so you will not see them.

This functionality is available for all the text output to the standard output or standard error. It works for Java, C/C++, Perl, Python, shell, Groovy, Maven, any Eclipse supported language.

Option

Description

Default

Enable ANSI support

This preference controls whether the console interprets ANSI escape sequences to generate styled output, or such sequences are rendered as is.

For example "Hello ␛[31mGREEN␛[m world!" will be rendered as "Hello GREEN world!" when this this preference is on, and as "Hello ␛[32mGREEN␛[m world!" when it is off.

On

Use Windows color mapping (bold => intense, italic => reverse)

This preference controls whether the console interprets the bold (1) ANSI code as increased intensity and the italic (3) ANSI code as inverse.
This is something that the “traditional” Windows command prompt (cmd.exe) does.

Off
Show the escape sequences

This preference controls whether the console shows the ANSI code or not.
The codes still generate styles, but they are also rendered, in a smaller font.

This is useful for debugging problems with the codes.

For example "Hello ␛[31mGREEN␛[m world!" will be rendered as "Hello ␛[32mGREEN␛[m world!" when this is on.

Off
Try using the standard error color setting for stderr output

This preference controls whether the console tries to preserve the default color associated with standard error stream.

Normally the Eclipse Console uses a different color for the standard output and the error output streams (stdout and stderr).
This can interfere with the colors generated by ANSI codes. When this is on the console will try its best to preserve the stderr color when not explicitly overridden by an ANSI sequence.

When this is off the stderr color is completely ignored.

On
Put RTF in Clipboard. You will be able to paste styled text in some applications.

This preference controls whether the Copy command uses plain text or rich text (RTF) in the clipboard.

When this is on the RTF format is used, and pasting the content (in some applications) will preserve the styles created by ANSI codes (colors, and attributes).
If this is off then the Copy command will store only plain text in the clipboard.

On
Color palette

This preference controls what real colors correspond to various ANSI codes.

For example the “31” code means “red”.
However, the exact shade of red depends on the terminal application. Some terminal applications even have a configurable palette.
This option allows you to select one of the commonly used color palettes.

Will match current operating system.
Debugger
Java perspectives
Java views
Local debugging
Remote debugging Launching a Java program
Running and debugging Console View
Installed JREs Preferences
Java Debug Preferences
Launching Preferences
Perspectives Preferences
Run/Debug Preferences
String Substitution Preferences
View Management Preferences