Eclipse Mars under Linux: Selection overwrites word specific coloring - linux

What I'm trying to say is, when selecting a bit of code, the special coloring a word has (purple for keywords, blue for member variables, brown-ish for local identifiers...) is overwritten by black.
I'm not sure whether this is a Linux thing or if there are some settings I haven't seen. Changing foreground selection color in Preferences unsurprisingly only changes the color the font has and doesn't influence the fact that its color gets overridden - what I'd like is something like a transparent foreground selection color. I'm on Fedora 22 if that's of any relevance.
Ordinary text - color communicates information:
Selection causes whole text to be completely black:

Related

Temporarily colour Linux Terminal foreground and background text

How can I temporarily set the colors of my Linux Terminal? I wish to add to a script, a color setting so that I remember to run the partner script a few minutes later. The color change would be set on in one script and removed in the other and would act as a visible reminder to me.
So the color change needs to be applied after the terminal is started up and needs to stay for all subsequent typing until it is removed by another equivalent command.
My terminal is GNOME Terminal 2.31.3
There's more than one way to change colors. VTE (the actual terminal within GNOME Terminal) implements these features (generally from xterm):
"ANSI color" escapes (which would be useless to you, since many programs reset those)
changing the text foreground and background using non-ANSI dynamic colors (resetters are rare)
changing the color palette (again, resetters are rare)
The latter two are documented in XTerm Control Sequences, in the section Operating System Commands:
OSC Ps ; Pt BEL
OSC Ps ; Pt ST
gives the form of the control sequence, e.g., escape]Ps;PtBEL
The dynamic colors are described here:
The 10 colors (below) which may be set or queried using 1 0
through 1 9 are denoted dynamic colors, since the correspond-
ing control sequences were the first means for setting xterm's
colors dynamically, i.e., after it was started. They are not
the same as the ANSI colors. These controls may be disabled
using the allowColorOps resource. At least one parameter is
expected for Pt. Each successive parameter changes the next
color in the list. The value of Ps tells the starting point
in the list. The colors are specified by name or RGB specifi-
cation as per XParseColor.
and other colors here:
Ps = 4 ; c; spec -> Change Color Number c to the color spec-
ified by spec. This can be a name or RGB specification as per
XParseColor. Any number of c/spec pairs may be given. The
color numbers correspond to the ANSI colors 0-7, their bright
versions 8-15, and if supported, the remainder of the 88-color
or 256-color table.

Which ANSI code should I use to make text muted (dark gray)?

When I use code 1;30m it produces different results:
Xshell 5: gray and bold
PhpStorm terminal: only bold
Windows console: only gray
The goal is to make a part of text to be slightly muted, but if it possible, it should display similarly in most terminal clients.
Anyway I don't understand how "bold" flag can change the foreground color. What am I doing wrong?
ANSI didn't specify that. ANSI listed black, red, etc., and also mentions bold. How a particular terminal displays bold+black is implementation-defined (no standard applies).
"ANSI" refers to x3.64, withdrawn many years ago, replaced by ECMA-48 (aka ISO 6429).
For your amusement:
ECMA-48:
Control Functions for Coded Character Sets
Aren't bright colors the same as bold? (xterm FAQ)
How do I get color with VT100? (ncurses FAQ)
Confirmed, on xterm that displays a muted gray and on emacs it produces black.
You can try a 256-color code like ^[[38;2;85;85;85m (which may also give inconsistent results for the reasons mentioned in #ThomasDickey's linked articles).

Remove terminal border colors from vim colorschemes

I want the color scheme to span completely across the terminal boundaries. I am using Color Scheme Scroller Plugin to switch between different theme. I have uploaded a .gif file so that you can clearly see what I want to get fixed. Vim colorschemes doesn't completely change the color of editor. There are some terminal color's borders left around the vim's overridden color scheme. How would I fix it.
Please check the image on this link. Stackoverflow doesn't allow uploading an image > 2Mb
You can't do that from Vim itself.
Terminal emulators use that padding to preserve readability when characters are displayed next to the borders of the window. The programs you run in your terminal have no knowledge of that padding and thus no ability to change it.
But you can read the documentation of your terminal emulator or take a look at its source code to find a way to enable/adjust/disable that padding.
FWIW, there's no way to change that in Terminal but it can be done for iTerm.
Alternatively, you could simply set the background color of your terminal to the one used in your vim colorscheme.
The image appears to depict behavior outside vim's control:
it is using a terminal emulator (could be xterm, could be some other).
the terminal emulator draws character cells on a window
those cells form a grid; the window may extend beyond the grid
the window can have a background color
the grid can have a background color
within the grid, most terminals provide some capability of drawing text with specific foreground and background colors
the grid can have a default background color which is not any of the specified colors
outside the grid, the window can also have a default background color
normally, the grid- and window-default backgrounds are the same
the window can be resized to (more or less) arbitrary sizes
the grid is constrained to exact character sizes
because of this difference, the window can have areas outside the grid which use its default color, and not match the grid's background color.
escape sequences which could affect the grid- and window-background colors are doing erases (see for example the ncurses FAQ My terminal shows some uncolored spaces).
though it is conceivable that erasures within the grid could affect those outside areas, doing that generally leads to odd visual effects.

Qt: Setting TableView Highlight color in Linux

I’m using PyQt4/PySide, but this problem occurs in both, so I think it’s a Qt problem generally. I have a TableView. When I want to set the background color of highlighted table items in Windows, I can get the TableView’s palette and call
palette.setColor(QPalette.Highlight, QColor(someColor))
and that sets the background color of a highlighted item, no problem. However, this does not work in Linux. (Specifically the different versions of Ubuntu that I’ve tried.) Instead the highlighted color is always an orange color that Ubuntu likes to use. Is there a way to fix this? Setting other types of colors, such as QPalette.Text, works fine, it’s a QPalette.Highlight issue only.

Vim on debian: cterm=bold doesn't work (using it over ssh with PuTTy as a client)

I've been trying to get colourschemes to work properly in VIM (on debian) when using it over ssh with PuTTy as a client (from windows7).
Such code from theme hi Search cterm=bold does not work - words are not bold.
I have tried a lot of themes - and I have found no themes with bold words (but using gvim on windows gives me bold words).
I'd appreciate any advice.
PuTTY by default represents bold as a brighter color, but you can change that at Change Settings > Window > Colours > [ ] Bolded text is a different colour. From the help:
Bolded text is a different colour
When the server sends a control sequence indicating that some text should be displayed in bold, PuTTY can handle this two ways. It can either change the font for a bold version, or use the same font in a brighter colour. This control lets you choose which.
By default the box is checked, so non-bold text is displayed in light grey and bold text is displayed in bright white (and similarly in other colours). If you uncheck the box, bold and non-bold text will be displayed in the same colour, and instead the font will change to indicate the difference.

Resources