The following preferences can be set using the Run/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 |
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. |
Off |
Show the escape sequences |
This preference controls whether the console shows the ANSI code or not. This is useful for debugging problems with the codes. For example |
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
( When this is off the |
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). |
On |
Color palette |
This preference controls what real colors correspond to various ANSI codes. For example the “31” code means “red”. |
Will match current operating system. |