Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color for current line and visual blocks missing #207

Closed
welblaud opened this issue Aug 21, 2019 · 9 comments
Closed

Color for current line and visual blocks missing #207

welblaud opened this issue Aug 21, 2019 · 9 comments

Comments

@welblaud
Copy link

welblaud commented Aug 21, 2019

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):
obrazek

@arcticicestudio
Copy link
Contributor

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?
  • Is the problem reproducible using another theme?

Also, if you're using the st terminal the problem might be related to nordtheme/vim#166. If so please try to follow the steps that were done in the comments of nordtheme/vim#166 (setting the special variables) to see if this solves the problem.

@Benjamin-Lee
Copy link

Benjamin-Lee commented Sep 3, 2019

I am currently facing these issues running iTerm with Fish on MacOS, so it's definitely not an isolated issue.

image

@dagolinuxoid
Copy link

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:
nord.png
PS.

Note that setting the 'cursorline' or 'cursorcolumn' options can cause Vim to respond slowly, especially for large files or files with long lines.

@arcticicestudio
Copy link
Contributor

@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

@dagolinuxoid
Copy link

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

@galah92
Copy link

galah92 commented Jul 29, 2020

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?

@MrSicario
Copy link

I'd add the lines to the install guide so people are aware of the issue

@BenResTech
Copy link

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.

@jvoisin
Copy link

jvoisin commented Apr 16, 2022

It's documented in the readme that only true colours are supported.

@svengreb svengreb transferred this issue from nordtheme/vim May 29, 2023
@nordtheme nordtheme locked and limited conversation to collaborators May 29, 2023
@svengreb svengreb converted this issue into discussion #208 May 29, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

9 participants