Skip to content

Set terminal colors in Vim with termguicolors#282

Open
rbong wants to merge 1 commit into
morhetz:masterfrom
rbong:master
Open

Set terminal colors in Vim with termguicolors#282
rbong wants to merge 1 commit into
morhetz:masterfrom
rbong:master

Conversation

@rbong
Copy link
Copy Markdown

@rbong rbong commented May 27, 2019

When the termguicolors setting is enabled, default ANSI colors are used by default in Vim.

Colors can be set in Vim similarly to neovim as of this merged PR:

vim/vim#2747

See this issue for more context:

vim/vim#2353

When the termguicolors setting is enabled, default ANSI colors are used
by default in Vim. Colors can be set similarly to neovim.
@rbong
Copy link
Copy Markdown
Author

rbong commented May 27, 2019

Turns out that this is a duplicate of #246 and #261. I was searching for g:terminal_ansi_colors when checking for duplicates and I didn't get any results. However, since this is the only signed PR out of those right now, I'll leave it up.

@PetrusZ
Copy link
Copy Markdown

PetrusZ commented Feb 23, 2020

So, what happened? Why the code is gone? It's very ugly when using vim build-in terminal at now.

if exists('*term_setansicolors')
  let g:terminal_ansi_colors = repeat([0], 16)

  let g:terminal_ansi_colors[0] = s:bg0[0]
  let g:terminal_ansi_colors[8] = s:gray[0]

  let g:terminal_ansi_colors[1] = s:gb.neutral_red[0]
  let g:terminal_ansi_colors[9] = s:red[0]

  let g:terminal_ansi_colors[2] = s:gb.neutral_green[0]
  let g:terminal_ansi_colors[10] = s:green[0]

  let g:terminal_ansi_colors[3] = s:gb.neutral_yellow[0]
  let g:terminal_ansi_colors[11] = s:yellow[0]

  let g:terminal_ansi_colors[4] = s:gb.neutral_blue[0]
  let g:terminal_ansi_colors[12] = s:blue[0]

  let g:terminal_ansi_colors[5] = s:gb.neutral_purple[0]
  let g:terminal_ansi_colors[13] = s:purple[0]

  let g:terminal_ansi_colors[6] = s:gb.neutral_aqua[0]
  let g:terminal_ansi_colors[14] = s:aqua[0]

  let g:terminal_ansi_colors[7] = s:fg4[0]
  let g:terminal_ansi_colors[15] = s:fg1[0]
endif

@PetrusZ
Copy link
Copy Markdown

PetrusZ commented Feb 23, 2020

Oh, my bad. I didn't notice it not merged in to this repo.
So, what we're waiting for? Why don't add terminal colors for vim? There already are terminal colors for neovim!

@rbong
Copy link
Copy Markdown
Author

rbong commented Feb 24, 2020

@PetrusZ gruvbox is no longer actively maintained. Try out this fork which has the majority of the current pull requests merged and issues resolved: https://github.com/gruvbox-community/gruvbox

@PetrusZ
Copy link
Copy Markdown

PetrusZ commented Feb 24, 2020

@rbong gruvbox seems to become actively again, but I'll try gruvbox-community/gruvbox. Thank you.

@rbong
Copy link
Copy Markdown
Author

rbong commented Feb 25, 2020

My bad, I did not see that new commits were recently added. Good to see commits on the original codebase.

@morhetz
Copy link
Copy Markdown
Owner

morhetz commented Feb 25, 2020

I'd rather say spare time activity maintainment 😉

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

Successfully merging this pull request may close these issues.

3 participants