vimrc italic comments in wsl2 - vim

Using vim on wsl2 windows terminal app, I'm trying to get comments in italics with
highlight Comment cterm=italic gui=italic
I installed JetBrains Mono font on my system but it doesn't render the italics inside vim, instead I just get the comments highlighted in white.

Related

coc.nvim selected suggestion background color

The background color of the currently-selected-suggestion does not contrast enough with the text to be readable. How can this be fixed?
Setting Pmenu and/or PmenuSel in does NOT improve the situation, as neither change this background color.
.exrc is EMPTY (so no color changes by me)
Using default terminal program, without changing any colors.
Using vim (8.2) on MacOS Monterey (12.5) with the M1 (arm64) cpu.
Same issue on iTerm2 using custom color scheme, so it's not the terminal's fault, I don't think.
Same problem on my side, after trial and error using
hi CocMenuSel ctermbg=darkgrey ctermfg=yellow
hi CocSearch ctermfg=blue
in ~/.vimrc
produces a reasonable contrast on my side with on a Mac with white terminal bg.
Use :hi to scroll thru the color suggestions of vim to see the possible names and color appearance.

Setting a color theme on Vim

I've updated vim to its latest release (8.1.39) and I'm still not able to have a color theme working. I've downloaded atom.vim to ~/.vim/colors. Note: in my Ubuntu install it's working just fine.
And my ~/.vimrc is as follows:
set t_Co=256
set background=dark
colorscheme atom
syntax on
When I run :colorscheme in vim it returns atom but still with no color/syntax highlight at all.
What could I be missing?
Thanks!
The colorscheme you are trying to use only works with GUI Vim (GVim/MacVim) or maybe with TUI Vim but only if your terminal supports true colors and if your Vim is built with that feature and if you :set termguicolors (and possibly other hacks).
See :help 'termguicolors'.
Also, the README.md is not called IGNOREME.md for a good reason:
Currently Atom is GVim only. I tend to use the default colours when (infrequently) in a terminal. If you have a strong desire for added terminal support leave me a comment, drop me an email or even better: send me a pull request!
(Emphasis mine.)

vim-pandoc-syntax italic text is displayed with white background

I'm using the vim-pandoc-snytax plugin to syntax-highlight pandoc-flavoured markdown. If I mark text as italic like this *italic*, it is displayed with a white background:
All the rest of the syntax highlighting works fine, just this white background of italic text is very disturbing.
I'm using Vim 8.0 installed from Homebrew on Mac 10.11.1. I observe the same behaviour in Terminal.app and iTerm. Currently, I use the built-in slate colour scheme, but this white background appears in any colour scheme I use.
Moreover, this white background appears whenever I set the filetype to one of :setf markdown, :setf markdown.pandoc, and :setf pandoc. That is, this white background appears also without the vim-pandoc-syntax plugin, if I just activate the built-in markdown syntax highlighting.
How can this white background of italic text be removed?
Apparently, the problem was that vim tried to format the text enclosed in * as italic, but the terminal, in which vim was running, didn't support italic text.
The Mac Terminal app doesn't support italic text at all. In iTerm, italic text can be enabled in Preferences > Profiles > Text.
After enabling italic text in iTerm, the white background didn't appear anymore, and instead the text was correctly displayed in italics.

How do I make a vim color scheme work with gvim?

I am trying to use this color scheme
https://github.com/goatslacker/mango.vim
It works when I open vim from the command line. But I usually open files from the file manager GUI and that opens them in gvim. The color scheme displays a white background in gvim. How do I fix it so it displays a dark background?
I've looked at the mango.vim file and it has the line set background=dark but apparently that is not working.
Vim separates between term, cterm (color terminal) and gui since they are capable of handling different numbers of colors
mango.vim only gives highlighting instructions for cterm. If it were for gui aswell it would look like this:
hi Comment term=bold ctermfg=Red guifg=Red0
So if your color-scheme lacks gui support it will reset to default.

EasyMotion coloring in vim with Solarized theme?

I'm using the Solarized theme for vim (which is amazing), but the color defaults for EasyMotion are, well, downright unreadable.
When I activate EasyMotion, the leader letters are clearly visible (bright red, with Solarized Dark), but the words they key to are barely a shade different from the background (dark blue against slightly darker blue background).
How can I change this to be more readable?
SOLUTION: Edit your .vimrc file like so:
" change the default EasyMotion shading to something more readable with Solarized
hi link EasyMotionTarget ErrorMsg
hi link EasyMotionShade Comment
A la section 4.5 in the docs for the plugin.
The author of EasyMotion has written excellent documentation on what is possible with EasyMotion. The helptags that stand out to me are EasyMotion_do_shade and easymotion-custom-hl. These define whether or not to highlight the shaded text and how to hilight the shaded and target text.
I tend to use the same highlighting as when searching.
There are also two more settings available, refering to the source code (https://github.com/Lokaltog/vim-easymotion/blob/master/t/easymotion_spec.vim#L507) :
" easymotion highlight colors
hi link EasyMotionTarget Search
hi link EasyMotionTarget2First Search
hi link EasyMotionTarget2Second Search
hi link EasyMotionShade Comment

Resources