Why do all my MacVim color schemes look wrong? - vim

I am having a problem with my MacVim color schemes. I have 'syntax on' in my .vimrc and I work mostly with Python.
As an example, I have attached a screenshot of what the "default" color scheme looks like in MacVim to me. I am having this problem with varying degrees of color differences for all the different schemes. Whenever I find a scheme I like online, it never looks like it does in the screenshot.
Any ideas on what the problem is?

Many themes provide modes for both dark background colors and light background colors. If you'd like to keep using this theme, try running:
:set background=light
Most of the themes I've seen were designed with a dark background and lighter text in mind -- I personally find a mostly-black screen easier on my eyes than a mostly-white screen -- so perhaps you just need to change the background color to something dark. In which case, you'd then want to run:
:set background=dark

The problem seems to be in ~/.gvimrc, look at what it does with the highlights (such as highlight NonText guibg=grey80). I've just placed them in an if !exists("stupid_colors").

Related

How to solve the conflict with the color of dark solarized and some output?

I really like the solarized and use it as the color scheme of my iTerm and Vim.
But recentlly, I start using Node.js. The problem has been bothering me for weeks.
The color of the result of mocha and pm2 seems the same the background of dark cheme,
I do not want to change to other color scheme.
So what should I do?
Thanks!!
Finally the setting of Contrast of iTerms fixed it for me.
This patch from iTerm2 Color Schemes leaves the rest of the Solarized Dark theme unchanged while patching the unfortunate issue with the background being set to bright-black.
If someone have the same problem, please use this patch for solarized.

Are there conventions on which color combinations go well together?

Most terminal color palettes have colorschemes that are customizable.
Many terminal users make use of some standard colorscheme such as solarized.
I'm building a terminal application that needs to use colors.
My question is, how do I know which color combinations from the terminal color palette go well together?
For instance, in the colorschemes that I use, the last color in the palette generally serves well as an alternative background color, but I couldn't afford the risk that some text is hardly visible for someone else because of his different colorscheme.
Are there any conventions on this?

VIM Background - Terminal left a Border?

when i running Terminal-VIM in fullscreen-mode with a Colorscheme there are still a small border from the standard terminal background color.You can see right and down.
Is there a easy way to fix this that there are always the background color from the scheme i use? Or a easy way with the vimrc ?
best regards
The only fix is to have your terminal and vim's background use the same color. Or make vim not have a background color.
Some terminals like urxvt allow you to define the width of that gutter, maybe your terminal does too.

Solarized color scheme and palette distorts for ssh'd users in iTerm2

My setup includes vim, iTerm2, tmux, and the solarized dark color scheme. I have the dark solarized color palette loaded into iTerm2 (modifies the ansi colors) and do not use the degraded solarized color scheme (i.e., let g:solarized_termcolors=256) as talked about in the readme as an alternative to using the color palette. Everything looks great.
But, I often remote pair with co-workers. Folks ssh into my machine from other instances of iTerm2 and sometimes Terminal.app and create a new tmux session with my tmux session as their base/parent session. In the case of iTerm2, their setup does not include loading the solarized color palette (one uses another palette entirely) and setting the let g:solarized_termcolors=256 to use the degraded solarized color scheme. If that's what they want, great, but when they connect to me via ssh/tmux the colors are lost and often times distorted to the point of being illegible.
Is there any combination of settings, besides having everyone use the same settings, to remedy this? Right now the recommendation is for me to use the degraded color scheme and not load the solarized color palette so that the ansi colors are not modified. This does work, but leaves me w/ the degraded solarized color scheme. And as I prefer the non-degraded solarized color scheme, I'd prefer not to take this approach.
When used in a terminal, the solarized colorscheme for Vim defaults to 16 colors and depends on the palette of the terminal emulator because it uses "Red", "Yellow"… as values for ctermfg and friends.
If you want the same colors everywhere you obviously need to have the same palette everywhere because your "Red" may not be someone else's "Red".
I don't know what the author smoked when he wrote it but let g:solarized_termcolors=256 is not "degraded" at all compared to the default. The default uses only a palette of 16 colors (dependant on the terminal's palette, as we have already seen) while this option makes it use a terminal-independant 256 colors palette. Because the colorscheme is not dependant on the terminal emulator's palette anymore, the colors are actually "guaranteed" to look "good" and "the same" on your terminal emulator and on someone else's terminal emulator.
The catch is that your terminal emulator and their terminal emulators must support 256 colors. All of todays terminals do, but the default is often set to 16 colors. It's generally easy to turn 256 colors support "on", though.
But this option is Vim-only. The colors of your prompt or of the output of some commands or of tmux's TUI may still feel "off" to your co-workers.
The ability to customize the hell out of your setup is of course an important aspect of the Vim experience. But customization comes at a price. You get used to many little things and it could happen that, confronted to a vastly different setup, well… you just get lost. Or, as happens to you, your setup is customized to the point of being unusable by your co-workers.
Pair programming can only work if you and your pair are able to reach compromise on a setup. Obviously, this setup may not be exactly yours or his but you must find a middle ground on which everyone agrees for pairing to work. Because you and your pair may use different versions of tmux/vim, different shells or different terminal emulators, the safest bet is to use the most basic setup possible. Unfortunately for you, solarized is too fragile and far from being "basic" enough.

Why doesn't VIM recognize a color totally available?

This is mystery drives me crazy: I am trying to specify certain colors that are listed inside gVim 7.3 when running this script.
But when put in a .vim syntax file, gVim simply issues an error "Color name not recognized". This happens even with simple colors like orange. Instead, it only recognizes a few colors like red, blue, yellow, darkyellow, darkgreen, black, etc.
Why does this happen and how to workaround this?
Because, as a terminal program vim only supports ANSI colors by default.
http://en.wikipedia.org/wiki/ANSI_escape_code#Colors
I don't know enough about syntax files to fully answer, but these links might be useful
http://vim.wikia.com/wiki/256_colors_in_vim
http://vim.wikia.com/wiki/View_all_colors_available_to_gvim
It's possible that only the normal colors are available to syntax files from there you can use a different color scheme to reassign the normal colors.
http://vimcasts.org/episodes/creating-colorschemes-for-vim/
I ended up solving the problem by hard coding the offending color (orange) in the .vim file:
hi def MyOrange_color ctermfg=202 guifg=#ff5f00

Resources