vim/colorschemes

sample_terminal.vim doesn't do anything useful

gdupras opened this issue · 4 comments

When I run the suggested command in sample_terminal.vim,

vim -Nu NONE -S colors/tools/sample_terminal.vim +source\ colors/blue.vim

I get an empty terminal buffer. I feel like this script is incomplete but I might be doing something wrong.

I'm using Konsole on Kubuntu. msgcat --version says 0.21.

$ msgcat --color=test is supposed to output something like that (partial screenshot):

Capture d’écran 2022-03-28 à 08 12 35

I used that command because it seemed to be widely available and quite convenient but, if it doesn't work for you, we should probably look for another script that outputs a) colors and b) typographic attributes.

Interesting. I've tried doing msgcat --color=test directly in a few terminals (i.e. not in Vim's terminal window). I got the output you posted in:

  • Windows subsystem for Linux (WSL) on Windows 10, with Ubuntu 20.04.

I got no output at all in:

  • Konsole on Kubuntu 21.10
  • Msys2 on Windows 10
  • Mingw64 on Windows 10
  • Git Bash on Windows 10
  • cmd.exe on Windows 10

Searching online a bit, I found this bug report:

msgcat --color=test no longer works

This persons says that this command works in Ubuntu 20.10 but not in 21.04:

  1. What happened instead

There is no output:

$ msgcat --color=test
$

This corroborates what I'm seeing. So it looks like a bug with recent versions of msgcat and/or Ubuntu.

Well, I use msgcat 0.21 on Mac OS and it works perfectly so ¯\_(ツ)_/¯.

If you can find or write a working cross-platform alternative that shows at least:

  • colors 0 to 15
  • normal, bold, italic, underline, reverse

I will gladly replace the current command.

Hmm, I guess I'll wait until Kubuntu 22.04 is out next month and see if that version has the same issue.

But for a more portable solution, maybe we could open a second Vim instance, inside the terminal window, and source a script that shows the different colors. Something like this:

vim --clean
:set termguicolors
:source colors/blue.vim
:term vim --clean
:source $VIMRUNTIME/syntax/hitest.vim

Anyway, I'm just thinking out loud. I'll see if something like this could work.