In vim, syntax color of terminal and iterm are different - macos

I'm new in vim setting T__T.
left is terminal display.
right is iterm2 display.
how to change the color in terminal to be like in iterm2
Thanks in advance.

Could you try to set background color light in both terminal and iterm?
In Vim,
: set background=light
or you can add
set background=light
in your .vimrc
Also, unchecking "Draw bold text in bright colors" might fix the issue.

Some vim colorschemes, including the default, take the terminal's color palette as default color values. However, if you use a colorscheme with full 256 color support, I believe there's a 256 colorscheme for the default as well, the issue disappears.
Here's a photo with desert (non-256) as a colorscheme between iTerm and Terminal:
And here's a photo with jellybeans (256):

Related

How to change the face of the text in the minibuffer when running in terminal mode?

When pressing M-x in Emacs, the focus switches to the minibuffer. When running Emacs in terminal mode, I have found that this text is really difficult to read as it is dark blue and difficult to distinguish from the dark grey color of my terminal. How can I change the font color of the text I type into the minibuffer?
I want to do this from my ~/.emacs, so that it happens every time I start Emacs in non-windowed mode.
I'm using Red Hat and the GNOME Terminal, if that makes any difference.
(custom-set-faces
'(minibuffer-prompt ((t (:foreground "orange")))))

OSX Terminal/Vim Syntax Colors

I've spent a bunch of time going over my Vim and Tmux configurations lately, trying to refine my workflow and I have come across a (small but annoying) problem that is stumping me. I am currently using OSX, but I have had the same issue with Windows' terminal/powershell.
My issue is that I am unable to change the brown color that appears in the default vim syntax highlighting which is used many of the languages that I write in. The color that I am speaking of can be seen in this vim colortest:
In the default OSX terminal (and in powershell) you can set the ANSI colors via terminal preferences, however, the brown color is not included in the GUI configuration options. This results in some ugly syntax highlighting that does not fit in with my desired color scheme:
My question is, what is the most portable way to change this default color? I would love to be able to do something in my .vimrc that would just work around this ugly color so I don't have to reconfigure colors for any system that I might be on, but I understand this might not be possible. Another route would be changing the syntax highlighting colors, but my investigations into that have so been unfruitful.
Thanks!
Appedix:
Colors selected in OSX profile for screenshots:
Sadly, the default Vim colorscheme is not as tidy as one would hope. In this case, Brown is a bit of a "catchall" name that ends up being interpreted differently in different contexts.
In GUI Vim, Brown refers to the "Brown" in X11's rgb.txt: #A52A2A.
In TUI Vim with &t_Co == 256, you get #af5f00, AKA 130 in the "xterm palette".
In TUI Vim with &t_Co == 16 or &t_Co == 8, you get your terminal palette's "Yellow", AKA 3.
By the looks of it, you seem to be affected by the second case.
While there exist ways to change the so-called "xterm palette" wholesale, you will have a hard time changing that specific color in a straightforward, non-messy way.
What you can do…
Do :set background=dark to force Vim to use a different set of default colors that doesn't include "Brown".
Choose a built-in or third-party colorscheme that doesn't use that specific color.
Override the Statement highlight group as explained in this gist with whatever color you want from the xterm palette.

Vim color scheme does not cover whole background

I'm using Zsh with agnoster theme and Vim.
When I try to change the color scheme of Vim, a bottom and left of screen are not applied by color scheme. First screenshot is before changing color scheme and the second id after changing color scheme. How can i fix this?
The left part is because that is the background of the LineNr column. You can change this with hi LineNr ctermbg=xxx.
The bottom is because vim isn't drawn in the whole screen in fullscreen mode. Unfortunately you can only fix this by changing the background in your terminal emulator's preferences to match vim's new background colour.

How to change terminal font color in PyCharm?

I want to set my terminal color scheme, such that I will have black text on light background (white or light yellow for example).
I changed "Console Colors" settings, such as Background, Standard output, and System output, under Editor > Colors & Fonts > Console Colors, but I keep running into the same problem.
If I change Background color to let's say white. It also changes text (Standard output and my user input to the same color). I can't figure out, which setting controls the color of the font, which appears in the terminal window. In fact, it appears that font color is the same as background color, which is confusing to me. I would expect to be able to independently control background color, and font color, which to me represents "Foreground".
<
Changing colour in
Preferences->Editor->Color Scheme->Console Colors->Standard Output
should change the terminal font's colour.
I suppose it happened on Windows. If yes then it is affected/controlled by Windows registry. Try one of the following method:
Open Windows cmd and from drop down menu selects defaults. Then change the Text and Background colors to match your choice in PyCharm. The problem occurs if you have different color settings in Windows cmd instead of default.
Delete HKEY_CURRENT_USER\Console key from Windows registry.
More information available on this link
To configure color and font scheme for consoles
Make sure you are working with an editable scheme.
Open the IDE Settings, and under Colors&Fonts, scroll through the list of components, and select the ones related to consoles:
Console Colors
Console Fonts
In the right-hand pane, click the desired component in the list, and change color settings and font type:
See Image of how to do it

msysgit vim cursorline is dark on my light background. how to set it to light or off

I have msysgit version 1.7.0.2-preview20100309 on windows 7
and my console windows has light background with dark text
when I open a file in vim (the vim included in msysgit)
I get cursorline highlight in dark color so I can't really see my text
for my own installation of gvim I use github256 color scheme but that has no effect in console.
I have looked at /share/vim/vimrc to see what's set there.
I changed cursorline to 'set nocursorline' and 'set background=light' but it has no effect.
How do I style my vim in msysgit?
How do I get rid of this dark cursorline
thanks
You can explicitly set the syntax coloration by specifying something like the following:
hi CursorLine guibg=#ffffff guifg=#000000 gui=NONE ctermbg=white ctermfg=black cterm=NONE term=reverse
You can include the above line your '~/.vimrc'. However, in the ideal case, setting the CursorLine highlight should be done in by the color scheme file being sourced by '~/.vimrc'. Most (well-written) color schemes should define a suitable CursorLine highlight as a matter of course. I would suggest using something like Pyte or my own MayanSmoke.

Resources