Fish autocomplete pager doesn't highlight options when tabbing through them - fish

Previously, fish would highlight the currently selected autocomplete. Now it doesn't. Do you know how to make it highlight it?
Observed behavior
Expected behavior

The selected background color is stored in $fish_pager_color_selected_background, or $fish_color_search_match if that isn't set.
It seems either these aren't set, or the value you chose looks like your terminal's background. Given that you now have a light background and fish has no way to detect it that's hard to avoid.
Use something like
set -g fish_pager_color_selected_background --background=533
to set it. The value should look like arguments to fish's set_color builtin.
See https://fishshell.com/docs/current/interactive.html#pager-color-variables for more information.

Related

How to change iPython error highlighting color

I'm using IPython with iterm2 in macOS. I had never had issues before with the color scheme, but this time when an exception occurs, it highlights certain parts in a color combination that I find very hard to read. I've tried with different color setups in iterm and also adjusting highlighting_style and colors in the ipython_config.py file, without much luck. I've seen there is an option to set specific colors highlighting_style_overrides but I haven't been lucky finding the right pygments option for this.
See Position below. This is the best contrast setup I've achieved, I still find hard it to read without focusing.
There is an open issue regarding this: https://github.com/ipython/ipython/issues/13446
Here is the commit which introduced this change:
https://github.com/ipython/ipython/commit/3026c205487897f6874b2ff580fe0be33e36e033
To get the file path on your system, run the following:
import IPython, os
os.path.join(os.path.dirname(IPython.__file__), 'core/ultratb.py')
Finally, open the file and look for:
style = stack_data.style_with_executing_node(style, "bg:ansiyellow")
For the time being, you can manually patch it by changing bg:ansiyellow to something that works best given your color scheme, e.g. bg:ansired or bg:#ff0000.
Here's an option you can drop in your ipython_config.py to duck punch in a better background color:
try:
from IPython.core import ultratb
ultratb.VerboseTB._tb_highlight = "bg:ansired"
except Exception:
print("Error patching background color for tracebacks, they'll be the ugly default instead")
Verified to work with IPython version 8.7.0

VS Code find-and-replace: is there a way to keep my previous find term when I type ctrl+h?

Currently, when I use ctrl+h with something highlighted, my find term is set equal to the highlighted text. Is there a way to stop that (and keep my find term the same as it was previously)?
Often I want to find-and-replace in VS Code, do something, highlight something, and then find-and-replace the same thing again. Is there a way to make it so that I don't have to retype my find term a second time?
I know there are some plugins that have this functionality; if you know of any that allow me to see both my find and replace terms at the same time, I would like to know.
Set this setting to false:
// Controls if we seed the search string in Find Widget from editor selection
"editor.find.seedSearchStringFromSelection": false,
Editor > Find: Seed Search String From Selection
Doing this will also affect your Find/Search in Files functionality.

How can I change the color of string values I type?

In my job I have recently begun using Powershell quite frequently. To facilitate using it, I am attempting to customize the command prompt colors to my liking, but I have run into a snag when attempting to customize the color of quoted string values. Given how PS is a text based interface, this statement may not mean that much, so please refer to this
Apparently I can't embed images yet, so you'll have to click the link.
Anyway, this text is extremely difficult for me to read, and I am attempting to switch it over to something with more contrast, but I can't find a setting for it.
I've looked at the following options already:
Setting these colors in the UI (right-click context menu), but that only allows setting default foreground and background
Setting the color utilizing $host.UI.RawUI, but this also only allows setting the default foreground and background
Setting the color using $host.PrivateData, but while this provides more options, it doesn't seem to have options for setting the more context sensitive items like the quoted text or even the variable you can see in the image.
My fallback plan is to use PowerShell ISE if I must (it allows me to customize this), but I would prefer to have a lighter weight command prompt available if possible.
Has anyone figured out how to change this?
I'm using PowerShell v5 on Windows 10.
PowerShell 5.0 ships with PSReadLine, a module that enhances the editing experience in the console by adding syntax highlight coloring among other things.
You can change the color of string tokens with Set-PSReadLineOption, for example:
Set-PSReadlineOption -TokenKind String -ForegroundColor Cyan
For PSReadLine version 2.0 and up, use the -Colors parameter and supply a dictionary of (optional) token color overrides to Set-PSReadLineOption:
Set-PSReadLineOption -Colors #{ String = 'Cyan' }

Eclipse editor line color

Is there any way to make Eclipse set the color of the line beginning with some expression to a specified value?
In my code I got lots of working "Log" calls which I want to save until any production-like version occurs, but they make it hard to read the code. So I need theses calls (lines, or it would be better if it would be full construction until ";") to be displayed in some other color, like light gray.
You could add a Task Tag, like "TODO", but use "log." or something like that. And the task tag lines appear in a user-specified color.

Emacs: hl-line-mode conflicts with highlight-phrase

I highlight current line by evaluating:
(hl-line-mode)
It could also be set globally:
(global-hl-line-mode nil)
The problem is that this way line highlighting overrides highlight-phrase. So my question is: "how to highlight both current line and a given phrase in this line?"
Both highlight-phrase and hl-line apply faces that have a background color set. hl-line wins because it uses an overlay, and overlays always override text properties, which highlight-phrase uses. I suggest that you work around this by customizing the hi-yellow face to use a bright foreground color instead of a background color, or even a box.
So here's some, definetly not ideal, solution. Do:
M-x customize-face
emacs then asks you which one, and I did
hl-line
Then I turned off "inherit" flag (the last one), and turned on the "foreground" flag, - it was saying "black" - I made it red. After that You should save it all at the top of the page - either - for this seccion only, or for future sessions too.
That's it! This way current line text arrears of red font, while highlight-phrase highlights the phrase with yellow.
Edit: The previous solution that I posted doesn't work, but this one should.
Highlight has two modes, one for font-lock-enabled buffers (which uses font-lock) and one for without (which uses overlay). The solution I found was to simply force highlight to use overlay at all times, and thus have higher priority over hl-line (because shorter overlays have an implicitly higher priority, given the same value of priority).
To do this I went into hi-lock.el and replaced every instance of font-lock-fontified with nil. Be sure to M-x byte-compile-file afterwards in order to update hi-lock.elc.