Integrated terminal colors for vim
repl6669 opened this issue · 4 comments
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!
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? 🤔
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
With terminal_ansi_colors
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!
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 🤔
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