vim / colorschemes

colorschemes for Vim
279 stars 23 forks source link

sample_terminal.vim doesn't do anything useful #158

Open gdupras opened 2 years ago

gdupras commented 2 years ago

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.

romainl commented 2 years ago

$ 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.

gdupras commented 2 years ago

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:

I got no output at all in:

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:

4) 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.

romainl commented 2 years ago

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:

I will gladly replace the current command.

gdupras commented 2 years ago

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.