vim
vim copied to clipboard
Color for current line and visual blocks missing
Despite I have set cursoline
highlighting up, there is no visible color. The same with visual block selections. The only clue about what is being selected is thanks to vim-indentline chars disappearing. (In gVim it works perfectly.)
- it is run in terminal
- bash 5.0.3
- terminal 3.32.1-1ubuntu1
- in terminal I tried to use Nord theme via Gogh or the basic system theme (it seems this may be the problem, it somehow overrides the colors)
- it is run alone, without any multiplexer
- Ubuntu 19.04
- as I can remember, other themes were OK (gruvbox, space_vim_dark, etc.)
At the moment, I have no idea how to run bare-bones Vim with the nord theme without broking my .vim directory.
This is what I get with both nord theme in terminal and in vim (besides the current line highlighting problem, it seems all colors are distorted a bit too):
Hi @welblaud, I need some more information regarding your setup (like mentioned in the issue template), otherwise there's no way trying to reproduce the problem:
- Are you running in GUI or terminal mode?
- If you're running in terminal mode, what's the name and version of your shell and terminal?
- Are you within an terminal multiplexer like
tmux
or connected to an external system via SSH?
- What is the operating system and version you're running?
- Have you tried to reproduce the problem with a clean Vim configuration (e.g. no other plugins and customizations) that only loads and sets Nord as
colorscheme
?- If not, have you checked that there are no any other modifications in your
vimrc
that might cause this problem?
- If not, have you checked that there are no any other modifications in your
- Is the problem reproducible using another theme?
Also, if you're using the st
terminal the problem might be related to #166. If so please try to follow the steps that were done in the comments of #166 (setting the special variables) to see if this solves the problem.
I am currently facing these issues running iTerm with Fish on MacOS, so it's definitely not an isolated issue.
![image](https://user-images.githubusercontent.com/13618205/64211669-e2e99d80-ce74-11e9-956e-06529c116b6b.png)
Terminal: simple terminal st
Theme: patch nordtheme
Application: Vim version 8.2.24
Colorscheme: nord
OS: ElementaryOS
Usually I don't use line highlighting but I tested it via :set cursorline
and it works as expected:
PS.
Note that setting the 'cursorline' or 'cursorcolumn' options can cause Vim to respond slowly, especially for large files or files with long lines.
@dagolinuxoid Thanks for testing and sharing your results, looks like both problems are related to Vim's color space again.
@Benjamin-Lee @welblaud Could you please try to add the following option to your configuration? It looks like Vim uses the 256 color palette instead of the hexadecimal colors defined by Nord.
if (has("termguicolors"))
set termguicolors
endif
BTW unfortunately in some cases in order to enable true color support (make sure your terminal support it), using just set termguicolors
isn't enough
I managed to make it work by adding these lines into vimrc config file:
" set Vim-specific sequences for RGB colors | enable true colors
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
I've got the same problem using Windows Terminal. Settingset termguicolors
does work and set cursorline
now works, but now the integrated terminal in vim (using :term
) has the wrong colors. Am I missing something?
I'd add the lines to the install guide so people are aware of the issue
Confirming that adding the set termguicolors
and set cursorline
options makes this work for me. This really would be great to add to the installation instructions.
It's documented in the readme that only true colours are supported.