4

I recently started using Windows 10's new "Windows Subsystem for Linux" feature ("Bash on Ubuntu on Windows") and I have been having difficulty getting colorschemes (specifically zenburn) to work in Vim.

From Bash's perspective, I have placed the colorscheme file in ~/.vim/colors/zenburn.vim, and "colorscheme zenburn" in ~/.vimrc. Unfortunately vim is still using the default colors.

Additionally, if I add "export TERM=xterm-256color" into my .bashrc, which is required for zenburn in Vim, the colors are grayscale.

Are colorschemes supported and what can I try to get them working?

5
  • Are you using Cygwin, or coLinux, or VirtualBox, or the Microsoft "Ubuntu on Windows" package? Mar 28, 2017 at 20:55
  • Ubuntu on Windows (I've seen it as Windows 10 Bash other places), edited. I think the problem is the answer I placed below. I'll have to wait until that build is pushed out since I need stability on this machine so I don't want to run the Insider Builds.
    – charon00
    Mar 30, 2017 at 17:04
  • 1
    Both "Ubuntu on Windows" and "Windows 10 Bash" are ambiguous; those phrases might mean "VirtualBox" or "Cygwin" or "MSYS2". The official name of the technology is the mouthful "Windows Subsystem for Linux", or "WSL" for short. I've suggested an edit to your question to use that name, and to add the [windows-linux-subsystem] tag. Mar 30, 2017 at 17:36
  • Thanks, I will start using the WSL terminology in the future.
    – charon00
    Mar 30, 2017 at 19:43
  • A) No problem! B) Excellent. May 11, 2017 at 16:59

2 Answers 2

3

From here: https://blogs.msdn.microsoft.com/commandline/2016/09/22/24-bit-color-in-the-windows-console/

24-bit RGB color was added to the Windows Console in Windows 10 Insiders Build #14931, and I am running an earlier build (#14393), which only supports 16 colors. Hopefully it will be included in the Creator's Update.

0

Assuming you want to be using Vim inside the console instead of GVim (I highly recommend just using GVim you then don't have to fight against minor issues), then the main thing for colorschemes is setting the terminal colours. Certainly at least when trying to use the solarized theme inside any Windows or Linux terminal this is a requirement.

The console (cmd, powershell and WSL) now has a Colortool, explained by this MSDN blog post. This will switch the terminal colours based on various colour schemes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .