Skip to content
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

sample_terminal.vim doesn't do anything useful #158

Open
gdupras opened this issue Mar 28, 2022 · 4 comments
Open

sample_terminal.vim doesn't do anything useful #158

gdupras opened this issue Mar 28, 2022 · 4 comments

Comments

@gdupras
Copy link

gdupras commented Mar 28, 2022

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
Copy link
Collaborator

romainl commented Mar 28, 2022

$ 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
Copy link
Author

gdupras commented Mar 29, 2022

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.

@romainl
Copy link
Collaborator

romainl commented Mar 29, 2022

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.

@gdupras
Copy link
Author

gdupras commented Mar 29, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants