1

When I scroll inside vim white spaces seem to get highlighted. Also the background color is the one I use to signal the 80 column while it should be the same color as the terminal as it can be seen in the picture. I want to know if there is a better workaround than my solution. And if there isn't at least I'd like to know how to adapt the colors of the colorscheme to more closely resemble the 24 bit colors. Specially the comments should be grey and not white and the 80 line signal color should be darker than the background not lighter.

My solution can be seen in the second picture and it's to modify the code that adds 24-bit color to the terminal found in onedark.vim to:

"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
if (has("linux") && empty($TMUX))
  if (has("nvim"))
    "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
    let $NVIM_TUI_ENABLE_TRUE_COLOR=1
  endif
  "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
  "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
  " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
  if (has("termguicolors"))
    set termguicolors
  endif
endif

I'm using Hyper 3.0.2 on Ubuntu 18.08 WSL Windows 10. This is my vimrc.

vim --version
NVIM v0.2.2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-_mzR4z/neovim-0.2.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=2 -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/build/neovim-_mzR4z/neovim-0.2.2/build/config -I/build/neovim-_mzR4z/neovim-0.2.2/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/build/neovim-_mzR4z/neovim-0.2.2/build/src/nvim/auto -I/build/neovim-_mzR4z/neovim-0.2.2/build/includeCompiled by pkg-vim-maintainers@lists.alioth.debian.orgFeatures: +acl +iconv +jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

There are a couple issues about this:

Vim background color renders incorrectly #832

Neovim theme background colors are being stripped when scrolling #70

both closed without arriving at a solution. I haven't found a workaround that actually works.

enter image description here enter image description here

  • Open a new issue then? Is Hyper actually using the Windows terminal? Or is that a different one? Perhaps try another terminal – Christian Brabandt Apr 3 at 12:54
  • The terminal supports 24-bit colors because the command printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n" displays the word TRUECOLOR in red. Which other terminal could I test? I don't know about WSL terminals. – ajr-dev Apr 3 at 13:15
  • Win+R type cmd<ENTER>. In cmd window type wsl, then open your vim and check colors. – Maxim Kim Apr 3 at 14:02
  • This seems to be a known issue with certain versions of Windows terminals. See if this answer helps: superuser.com/q/1534358/879179 – filbranden Apr 3 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.