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

Integrated terminal colors for vim #19

Open
repl6669 opened this issue Mar 18, 2021 · 4 comments
Open

Integrated terminal colors for vim #19

repl6669 opened this issue Mar 18, 2021 · 4 comments

Comments

@repl6669
Copy link

Hello, throughout the night I was trying to get colors for FZF preview untill I found out that it pretty much uses integrated terminal colors. After hours of googling, I found out that normal vim probably handles integrated terminal colors differently from neovim.

I wanted to create a PR, but I did not know how to quickly make it work with estilo, so I am just send a code snipped, which you could integrate somehow, if you think it's a good idea.

This is how I got it working.

It may require some tweaking, because it does not work with foreground and background I guess, so it differs from iTerm for example. But maybe I am still missing something.

let g:terminal_ansi_colors = [
        \ '#000000', '#e33400', '#5ccc96', '#b3a1e6', '#00a3cc', '#ce6f8f', '#7a5ccc', '#686f9a',
        \ '#686f9a', '#e33400', '#5ccc96', '#b3a1e6', '#00a3cc', '#ce6f8f', '#7a5ccc', '#ecf0c1']

Have a nice day!

@pineapplegiant
Copy link
Owner

Do you have any screenshots?

I'm not sure how the integrated terminal color works to be honest. I have my terminal prompt in spaceduck colors already, and I mainly use neovim... but I can try to setup a config to test out the colorscheme for vim.

Estilo compiles the spaceduck YAML: base.yml file into colorscheme which is: spaceduck.vim. I know there's some terminal color groups already present in the color scheme.

I'll just have to see how to get this in there separately if these aren't working? 🤔

@repl6669
Copy link
Author

Hello,

I am sorry for such late reply.

Here are some screenshots. I tried to display the colors with this command
for x in {0..8}; do for i in {30..37}; do for a in {40..47}; do echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "; done; echo; done; done; echo "" which i found here

Without explicitly setting terminal_ansi_colors
Screenshot 2021-03-30 at 0 29 53

With terminal_ansi_colors

Screenshot 2021-03-30 at 0 30 19

This is related only to normal vim, in neovim it works just fine, because it handles terminal colors differently. The terminal color groups you mentioned are the exact setters for neovim.

Maybe I should finally transition to neovim. 😃 But it maybe helpfull for other pure vim users.

Let me know if I can help somehow. I will try to persuade my colleague to make a PR to Estilo to support this.

Have a nice day!

@pineapplegiant
Copy link
Owner

pineapplegiant commented Mar 30, 2021

I’m also thinking a change in Estilo would be ideal, otherwise I’ll have to stop using it which wouldn’t be the end of the world. I can see if the owner is still active before making any big changes.

Also I appreciate you taking the time for opening up this issue 🚀

As it stands right now, I'm leaning towards dropping estilo and just updating the scheme manually as it's not terribly difficult. That way I can manually add this terminal bit if it's vim vs neovim.

I'm also thinking of starting a dedicated lua/neovim branch too 🤔

@pineapplegiant
Copy link
Owner

I've added these additions on the dev branch, so if you want to see what we're currently working on you can switch to using that branch @theimerj

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