[vim/vim] Change Vim's terminal colors when termguicolors is set (#2353)

1,200 views
Skip to first unread message

Lifepillar

unread,
Nov 20, 2017, 6:43:41 AM11/20/17
to vim/vim, Subscribed

While I have no problems with Vim's terminal colors with notermguicolors, when termguicolors is set the terminal always uses a default palette. For example, these are the ANSI colors in iTerm2 when both iTerm2's ANSI colors and Vim's colorscheme are set to Solarized:

iterm2-vim-ansi-colors

The same with MacVim (and, I guess, with any gVim). Is there a way yet to change those colors? I have only been able to change the background through the Terminal highlight group. Perhaps, there should be TerminalBlack, TerminalRed, and so on?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Bram Moolenaar

unread,
Nov 20, 2017, 12:42:25 PM11/20/17
to vim/vim, Subscribed

Lifepillar wrote:

> While I have no problems with Vim's terminal colors with
> `notermguicolors`, when `termguicolors` is set the terminal always

> uses a default palette. For example, these are the ANSI colors in
> iTerm2 when both iTerm2's ANSI colors and Vim's colorscheme are set to
> Solarized:
>
> <img width="614" alt="iterm2-vim-ansi-colors" src="https://user-images.githubusercontent.com/1193314/33016507-241a80b8-cdef-11e7-8752-38a67cf21c6d.png">

>
> The same with MacVim (and, I guess, with any gVim). Is there a way yet
> to change those colors? I have only been able to change the background
> through the `Terminal` highlight group. Perhaps, there should be
> `TerminalBlack`, `TerminalRed`, and so on?

Well, the idea is that you have already set terminal colors for use with
Vim, and that's what you will get in the terminal window. Once you have
something running there, you can change the colors inside it. E.g.,
when running Vim you can have that one use different colors (so that you
don't get confused about Vim running in a terminal window inside Vim).
((Could get worse, I was debugging Vim running the terminal debugger
plugin in a Vim using the terminal debugger in Vim...))

--
hundred-and-one symptoms of being an internet addict:
15. Your heart races faster and beats irregularly each time you see a new WWW
site address in print or on TV, even though you've never had heart
problems before.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Lifepillar

unread,
Nov 20, 2017, 1:20:57 PM11/20/17
to vim/vim, Subscribed

Well, the idea is that you have already set terminal colors for use with Vim

I'm not sure I understand. Do you mean my OS's terminal colors?

and that's what you will get in the terminal window.

When termguicolors is set (or in GUI Vim), the colors of my OS's terminal are not the colors I get in Vim's terminal window, except for the background (see screenshot in my previous post). Which is not surprising to me: at least in GUI Vim, which colors could Vim choose?

The main problem is that such colors are not always clearly visible against the background (in the example above, Solarized's background). I know that I can set the attributes of the Terminal highlight group to change the background. But my question is: can I change the remaining 15 colors instead?

For example, NeoVim has g:terminal_color_NN variables for that purpose.

Bram Moolenaar

unread,
Nov 20, 2017, 5:07:48 PM11/20/17
to vim/vim, Subscribed

Lifepillar wrote:

> >Well, the idea is that you have already set terminal colors for use with Vim
>
> I'm not sure I understand. Do you mean my OS's terminal colors?
>
> >and that's what you will get in the terminal window.
>
> When `termguicolors` is set (or in GUI Vim), the colors of my OS's
> terminal are *not* the colors I get in Vim's terminal window, except

> for the background (see screenshot in my previous post). Which is not
> surprising to me: at least in GUI Vim, which colors could Vim choose?

The "Normal" highlight color is used. And the Terminal group can be
used to do something else.


> The main problem is that such colors are not always clearly visible
> against the background (in the example above, Solarized's background).

Ehm, does that mean your Vim windows are hard to read?


> I know that I can set the attributes of the `Terminal` highlight group
> to change the background. But my question is: can I change the
> remaining 15 colors instead?

Why only use 15 colors? Either Vim is restricted to less than 256
colors, in which case you can't chose others. Or 256 or more colors are
supported, in which case the program running in the terminal can use
them.


> For example, NeoVim has `g:terminal_color_NN` variables for that
> purpose.

So you define 256 colors? I don't see much use for that.

I know that some terminals allow redefining the first 16 colors, but
that usually leads to lots of confusion and endless tuning, since no
program knows what to do.

I wonder, if not running the program in a Vim terminal window, do you
start a new terminal, with different color settings, to run that
program?


--
hundred-and-one symptoms of being an internet addict:
22. You've already visited all the links at Yahoo and you're halfway through
Lycos.


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Lifepillar

unread,
Nov 20, 2017, 5:53:44 PM11/20/17
to vim/vim, Subscribed

I haven't explained myself well, sorry. I am talking about the 16 ANSI colors that most terminals support and allow redefining. I am always running Vim in an environment that has at least 256 colors. In what follows, I assume that I am running Vim in an environment supporting millions of colors (i.e., a true-color terminal or a GUI version of Vim).

If I use a terminal and set notermguicolors, when I open a terminal window inside Vim—say, with a Bash shell—such shell inherits the 16 ANSI colors from the OS's terminal. So, a shell in my OS's terminal and a shell inside a Vim terminal window look the same. So far, so good.

If I set termguicolors, when I open a terminal window inside Vim, such window has its background set to Normal, but it uses a default 16-color palette independent of my OS's terminal settings.

For example, the following is a Vim terminal window, with notermguicolors and the Solarized 8 colorscheme, running in iTerm2 whose 16-color palette is set to Solarized, too:

iterm-notermguicolors-solarized

And this is the same configuration, but with termguicolors set:

iterm-termguicolors-solarized

Note that, in this case, the shell does not use the Solarized palette.

NeoVim has 16 variables g:terminal_color_0 through g:terminal_color_15, to set Vim's terminal 16-color palette using GUI colors (e.g., let g:terminal_color_0 = '#404040').

Bram Moolenaar

unread,
Nov 21, 2017, 7:13:20 AM11/21/17
to vim/vim, Subscribed

Lifepillar wrote:

> I haven't explained myself well, sorry. I am talking about the 16 ANSI
> colors that most terminals support and allow redefining. I am always
> running Vim in an environment that has at least 256 colors. In what
> follows, I assume that I am running Vim in an environment supporting
> millions of colors (i.e., a true-color terminal or a GUI version of
> Vim).
>
> If I use a terminal and set `notermguicolors`, when I open a terminal

> window inside Vim—say, with a Bash shell—such shell inherits the 16
> ANSI colors from the OS's terminal. So, a shell in my OS's terminal
> and a shell inside a Vim terminal window look the same. So far, so
> good.
>
> If I set `termguicolors`, when I open a terminal window inside Vim,
> such window has its background set to `Normal`, but it uses a default

> 16-color palette independent of my OS's terminal settings.

Yeah, that's because libvterm does everything in RGB and uses its own
default 16-color palette. But we can convert this back to the original
16-color number, this happens in color2index(). But when Vim is using
256 or more colors, we use a lookup table color_numbers_256[] that uses
some of the >16 colors to get a better palette.

So it should work OK, if you set t_Co to 16 in Vim and disable
'termguicolors'. Can you try that? Then the program running in the
terminal window should use the right 16 colors (but colors outside of
those 16 may be wrong).


> For example, the following is a Vim terminal window, with
> `notermguicolors` and the Solarized 8 colorscheme, running in iTerm2
> whose 16-color palette is set to Solarized, too:
>
> <img width="705" alt="iterm-notermguicolors-solarized" src="https://user-images.githubusercontent.com/1193314/33045184-47741742-ce4c-11e7-986d-ecbacac3b121.png">

>
> And this is the same configuration, but with `termguicolors` set:
>
> <img width="705" alt="iterm-termguicolors-solarized" src="https://user-images.githubusercontent.com/1193314/33045195-57213c88-ce4c-11e7-8e9a-934de1321b07.png">

>
> Note that, in this case, the shell does not use the Solarized palette.
>
> NeoVim has 16 variables `g:terminal_color_0` through
> `g:terminal_color_15`, to set Vim's terminal 16-color palette using

> GUI colors (e.g., `let g:terminal_color_0 = '#404040'`).

That means every user has to define 16 colors to make it work. I rather
have it work out-of-the-box.

What would work is to ignore 'termguicolors' for the first 16 colors.
However, that's after converting RGB back to the color number, thus this
may fail.

I think we can only properly solve this by changing libvterm, it must
return the color number instead of RGB (or return both).



--
hundred-and-one symptoms of being an internet addict:
25. You believe nothing looks sexier than a man in boxer shorts illuminated
only by a 17" inch svga monitor.


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Lifepillar

unread,
Nov 21, 2017, 12:39:50 PM11/21/17
to vim/vim, Subscribed

So it should work OK, if you set t_Co to 16 in Vim and disable 'termguicolors'. Can you try that?

All is fine when termguicolors is disabled. My issue is specifically with termguicolors set, and with the first 16 colors only.

What would work is to ignore 'termguicolors' for the first 16 colors.

When Vim runs within a GUI (e.g., MacVim), which colors should a terminal window display then?

vim-dev ML

unread,
Nov 21, 2017, 1:55:53 PM11/21/17
to vim/vim, vim-dev ML, Your activity
On 17:39 Tue 21 Nov , Lifepillar wrote:
> >So it should work OK, if you set t_Co to 16 in Vim and disable 'termguicolors'. Can you try that?
>
> All is fine when `termguicolors` is disabled. My issue is specifically with `termguicolors` set, and with the first 16 colors only.
>
> >What would work is to ignore 'termguicolors' for the first 16 colors.
>
> When Vim runs within a GUI (e.g., MacVim), which colors should a terminal window display then?
>
> --
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly or view it on GitHub:
> https://github.com/vim/vim/issues/2353#issuecomment-346104155

I observe the same behaviour (on linux, gnome terminalxtermx), and
indeed when setting t_Co=16 and notermguicolor the first 16 colors are
the right ones. It would be nice indeed to have a solution for
termguicolors and t_Co=256.

Best regards,
Marcin

Bram Moolenaar

unread,
Nov 21, 2017, 2:47:57 PM11/21/17
to vim/vim, vim-dev ML, Comment

Lifepillar wrote:

> >So it should work OK, if you set t_Co to 16 in Vim and disable 'termguicolors'. Can you try that?
>
> All is fine when `termguicolors` is disabled. My issue is specifically
> with `termguicolors` set, and with the first 16 colors only.
>
> >What would work is to ignore 'termguicolors' for the first 16 colors.
>
> When Vim runs within a GUI (e.g., MacVim), which colors should a
> terminal window display then?

Whatever the terminal is configured with. The thing is that we can
expect the user to setup Vim (colorschme) to work well in this terminal.
We can assume other programs also work well, either by default or are
configued that way. So when opening a terminal inside Vim, the same
thing should happen.

If Vim is able to decode the values from libvterm, knowing it is using
the 16 ANSI colors, they can be passed to the underlaying terminal
as-is, and the right color should show up. Currently, when
'termguicolors' is on, then we always use the RGB values, and these are
likely different from what the terminal would show for these colors.

I'm discussing with Paul Evans if libvterm can return the color index,
so that Vim doesn't need to decode the RGB values. When using
'termguicolors' that won't be reliable.

--
How To Keep A Healthy Level Of Insanity:
5. Put decaf in the coffee maker for 3 weeks. Once everyone has gotten
over their caffeine addictions, switch to espresso.


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


You are receiving this because you commented.

Andy Massimino

unread,
Mar 12, 2018, 4:29:25 PM3/12/18
to vim/vim, vim-dev ML, Comment

Is there any possibility of this being addressed for the 8.1 release?

There's no way to adjust the ansi colors used in a :terminal in Gvim or when using termguicolors. I've resorted to changing the values in the ansi_colors table in src/libvterm/src/pen.c.

I understand the motivation for using the same colors as the underlying terminal, but this still leaves GVim out since there's no parent terminal. Generally, it would be nice if the RGB colors were configurable, if the user chooses to deviate from libvterm's defaults. This is necessary with many vim colorschemes, since the libvterm colors are difficult to read against certain backgrounds.


You are receiving this because you commented.

Bram Moolenaar

unread,
Mar 12, 2018, 5:28:21 PM3/12/18
to vim/vim, vim-dev ML, Comment

Andy Massimino wrote:

> Is there any possibility of this being addressed for the 8.1 release?
>
> There's no way to adjust the ansi colors used in a `:terminal` in Gvim
> or when using `termguicolors`. I've resorted to changing the values
> in the `ansi_colors` table in `src/libvterm/src/pen.c`.

>
> I understand the motivation for using the same colors as the
> underlying terminal, but this still leaves GVim out since there's no
> parent terminal. Generally, it would be nice if the RGB colors were
> configurable, if the user chooses to deviate from libvterm's defaults.
> This is necessary with many vim colorschemes, since the libvterm
> colors are difficult to read against certain backgrounds.

Hmm, so when a program running in a terminal window changes the ANSI
colors, we should recognize that and use the specified colors instead of
the 16 ANSI colors that Vim uses itself? It would only work if Vim
supports RGB colors, thus in the GUI or with 'termguicolors' set.

I suppose we could check if any of the ANSI colors is at a non-default
value. Or do this per color. Both have flaws. Would a program
normally only change one or two colors (e.g. foreground and background)
and expect the others to remain at their default? Or would that mean
all the colors that libvterm has should be used?

--
You have heard the saying that if you put a thousand monkeys in a room with a
thousand typewriters and waited long enough, eventually you would have a room
full of dead monkeys.
(Scott Adams - The Dilbert principle)


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


You are receiving this because you commented.

chdiza

unread,
Mar 12, 2018, 6:24:16 PM3/12/18
to vim/vim, vim-dev ML, Comment

This is necessary with many vim colorschemes, since the libvterm colors are difficult to read against certain backgrounds

Indeed, on macOS they're unusably difficult to read whenever the background is black or nearly so. This by itself is sufficient to make the :terminal feature worthless to me personally.


You are receiving this because you commented.

Andy Massimino

unread,
Mar 12, 2018, 6:29:37 PM3/12/18
to vim/vim, vim-dev ML, Comment

so when a program running in a terminal window changes the ANSI colors

Sorry, I'm not sure I fully follow. As far as I know, it's not possible for a program running in a terminal window to change the RGB values of the ANSI color palette since libvterm does not support the OSC 4 code for this. If a program uses the basic 8 or 16 ANSI colors, the expectation is that the user has already set up their terminal to their preference- the exact RGB values of these colors are not standardized between terminals so there's no consistency guarantee.

use the specified colors instead of the 16 ANSI colors that Vim uses itself

Yes, but I think it doesn't matter with GUI/termguicolors, since when does a GUI user ever see Vim's built-in 16 ANSI colors? Besides, how does one configure the 16 ANSI colors that GVim uses, as displayed in syntax/colortest.vim? Perhaps Vim's built-in 16 colors could be configured along with libvterm's 16 colors, but there is also little harm if they are distinct.

Or would that mean all the colors that libvterm has should be used?

What I am suggesting is give the Vim user the ability to use do some action or set some option which calls vterm_state_set_palette_color to change the RGB codes that libvterm knows the ANSI colors by. I am aware this would only work for GUI/termguicolors. A terminal+notermguicolors user would continue to see their normal terminal colors.


You are receiving this because you commented.

Bram Moolenaar

unread,
Mar 13, 2018, 1:37:14 PM3/13/18
to vim/vim, vim-dev ML, Comment

Andy Massimino wrote:

> > so when a program running in a terminal window changes the ANSI colors
>
> Sorry, I'm not sure I fully follow. As far as I know, it's not
> possible for a program running in a terminal window to change the RGB
> values of the ANSI color palette since libvterm does not support the
> OSC 4 code for this. If a program uses the basic 8 or 16 ANSI colors,
> the expectation is that the user has already set up their terminal to
> their preference- the exact RGB values of these colors are not
> standardized between terminals so there's no consistency guarantee.

Oh, I thought libvterm supports that. But apparently it's only possible
by calling vterm_state_set_palette_color().

Xterm has default colors which function as a reference. I made libvterm
use the same colors. However, with xterm they can be overruled with X
resources.


> > use the specified colors instead of the 16 ANSI colors that Vim uses itself
>
> Yes, but I think it doesn't matter with GUI/termguicolors, since when
> does a GUI user ever see Vim's built-in 16 ANSI colors? Besides, how
> does one configure the 16 ANSI colors that GVim uses, as displayed in
> syntax/colortest.vim? Perhaps Vim's built-in 16 colors could be
> configured along with libvterm's 16 colors, but there is also little
> harm if they are distinct.
>
> > Or would that mean all the colors that libvterm has should be used?
>
> What I am suggesting is give the Vim user the ability to use do some
> action or set some option which calls `vterm_state_set_palette_color`
> to change the RGB codes that libvterm knows the ANSI colors by. I am
> aware this would only work for GUI/termguicolors. A
> terminal+notermguicolors user would continue to see their normal
> terminal colors.

So, what we would want to do is like what X resources are for Xterm: Be
able to define the 16 ANSI colors that libvterm is using. Looks like we
don't need more than that.


--
hundred-and-one symptoms of being an internet addict:
7. You finally do take that vacation, but only after buying a cellular modem
and a laptop.


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


You are receiving this because you commented.

Antoine

unread,
Mar 23, 2018, 1:12:14 PM3/23/18
to vim/vim, vim-dev ML, Comment

As @lifepillar said, neovim terminal handles colors properly out of the box.
I did not have to set the g:terminal_color_ myself, everything was done automatically.

I don't know how they did it, but could Vim handle terminal colors the same way ?


You are receiving this because you commented.

Bram Moolenaar

unread,
Mar 23, 2018, 5:22:53 PM3/23/18
to vim/vim, vim-dev ML, Comment

What do you mean with "properly"? Please give a reproducible example. And without using iTerm2, I don't have that.


You are receiving this because you commented.

Antoine

unread,
Mar 23, 2018, 6:19:19 PM3/23/18
to vim/vim, vim-dev ML, Comment

@brammool , first my mistake, g:terminal_color_ are actually set by gruvbox (my colorscheme plugin).

Then here is the minimal .vimrc to reproduce the different behaviors:

call plug#begin('~/.vim/plugins_by_vimplug')
Plug 'morhetz/gruvbox'
call plug#end()

set termguicolors
colorscheme gruvbox

I used gnome-terminal on Ubuntu 16.04.
Here is what ls --color=auto looks on vim:
vim_term
Here is what ls --color=auto looks on neovim:
neovim_term

Maybe setting extra variable is not the right approach, but if it is, would it be possible to keep the same naming convention as in neovim ?
More and more features are slightly different between vim and neovim (terminal, jobs etc) and it makes it harder and harder for users and plug-in developers to support both editors.
Thanks a lot !


You are receiving this because you commented.

Bram Moolenaar

unread,
Mar 24, 2018, 9:02:43 AM3/24/18
to vim/vim, vim-dev ML, Comment

Antoine wrote:

> @brammool , first my mistake, ```g:terminal_color_``` are actually set by ``gruvbox`` (my colorscheme plugin).
>
> Then here is the minimal .vimrc to reproduce the different behaviors:
> ```vim

> call plug#begin('~/.vim/plugins_by_vimplug')
> Plug 'morhetz/gruvbox'
> call plug#end()
>
> set termguicolors
> colorscheme gruvbox
> ```
>
> I used gnome-terminal on Ubuntu 16.04.
> Here is what ```ls --color=auto``` looks on vim:
> ![vim_term](https://user-images.githubusercontent.com/10830594/37855477-b3268b12-2eac-11e8-96db-eb0e5ee0e1e7.png)

> Here is what ```ls --color=auto``` looks on neovim:
> ![neovim_term](https://user-images.githubusercontent.com/10830594/37855509-d58af832-2eac-11e8-96f6-0e97dfd5448e.png)

>
> Maybe setting extra variable is not the right approach, but if it is,
> would it be possible to keep the same naming convention as in neovim ?

As mentioned in the other message, using global variables looks like a
bad choice.


> More and more features are slightly different between vim and neovim
> (terminal, jobs etc) and it makes it harder and harder for users and
> plug-in developers to support both editors.

Neovim is a fork, thus they should follow Vim, if they so desire.
They made their own design choices and haven't discussed them on
vim-dev, so it's no surprise diversion happens.


--
hundred-and-one symptoms of being an internet addict:
46. Your wife makes a new rule: "The computer cannot come to bed."


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


You are receiving this because you commented.

Justin M. Keyes

unread,
Mar 24, 2018, 11:41:55 AM3/24/18
to vim...@googlegroups.com, reply+00b1d1981aea1d530407cf640db34865a1eb43d...@reply.github.com, vim/vim, vim-dev ML, Comment
2018-03-24 14:02 GMT+01:00 Bram Moolenaar <vim-dev...@256bit.org>:
>
> Antoine wrote:
>
>> @brammool , first my mistake, ```g:terminal_color_``` are actually set by
>> ``gruvbox`` (my colorscheme plugin).
>>
>> Then here is the minimal .vimrc to reproduce the different behaviors:
>> ```vim
>> call plug#begin('~/.vim/plugins_by_vimplug')
>> Plug 'morhetz/gruvbox'
>> call plug#end()
>>
>> set termguicolors
>> colorscheme gruvbox
>> ```
>>
>> I used gnome-terminal on Ubuntu 16.04.
>> Here is what ```ls --color=auto``` looks on vim:
>>
>> ![vim_term](https://user-images.githubusercontent.com/10830594/37855477-b3268b12-2eac-11e8-96db-eb0e5ee0e1e7.png)
>> Here is what ```ls --color=auto``` looks on neovim:
>>
>> ![neovim_term](https://user-images.githubusercontent.com/10830594/37855509-d58af832-2eac-11e8-96f6-0e97dfd5448e.png)
>>
>> Maybe setting extra variable is not the right approach, but if it is,
>> would it be possible to keep the same naming convention as in neovim ?
>
> As mentioned in the other message, using global variables looks like a
> bad choice.

The global variables are indeed a hack. I suggest instead highlight
group names like TermColor1, TermColor2, for each of the color
indices.

>> More and more features are slightly different between vim and neovim
>> (terminal, jobs etc) and it makes it harder and harder for users and
>> plug-in developers to support both editors.
>
> Neovim is a fork, thus they should follow Vim, if they so desire.
> They made their own design choices and haven't discussed them on
> vim-dev, so it's no surprise diversion happens.

Neovim project did try to follow Vim's own conventions. For example,
names of job*() functions were chosen in analogy with buf*()
functions, observing that the old buffer_exists(), buffer_name(), etc.
were deprecated. But then Vim decided to add underscores again for no
apparent reason. Not to mention, Vim's jobs API is arbitrarily
different, it isn't meaningfully different, so it is incompatible
merely on a whim with conventions that had already been established 2
years earlier by Nvim.

The name of TermOpen was discussed in:

https://groups.google.com/d/msg/vim_dev/c5uBCS-_QyI/S15G3mG5AgAJ

where Nikolai cited evidence that there's no consistent choice of
"term" or "terminal".

But you ignored the discussion, and named the event TerminalOpen,
anyway, which again adds entropy for no reason.

---
Justin M. Keyes

vim-dev ML

unread,
Mar 24, 2018, 11:42:10 AM3/24/18
to vim/vim, vim-dev ML, Your activity

Bram Moolenaar

unread,
Mar 24, 2018, 12:29:25 PM3/24/18
to vim/vim, vim-dev ML, Comment

Justin M. Keyes wrote:

> >> More and more features are slightly different between vim and neovim
> >> (terminal, jobs etc) and it makes it harder and harder for users and
> >> plug-in developers to support both editors.
> >
> > Neovim is a fork, thus they should follow Vim, if they so desire.
> > They made their own design choices and haven't discussed them on
> > vim-dev, so it's no surprise diversion happens.
>
> Neovim project did try to follow Vim's own conventions. For example,
> names of job*() functions were chosen in analogy with buf*()
> functions, observing that the old buffer_exists(), buffer_name(), etc.
> were deprecated. But then Vim decided to add underscores again for no
> apparent reason. Not to mention, Vim's jobs API is arbitrarily
> different, it isn't meaningfully different, so it is incompatible
> merely on a whim with conventions that had already been established 2
> years earlier by Nvim.
>
> The name of TermOpen was discussed in:
>
> https://groups.google.com/d/msg/vim_dev/c5uBCS-_QyI/S15G3mG5AgAJ
>
> where Nikolai cited evidence that there's no consistent choice of
> "term" or "terminal".
>
> But you ignored the discussion, and named the event TerminalOpen,
> anyway, which again adds entropy for no reason.

I did not ignore the discussion. I read the opinions and weighted them.
And decided that TerminalOpen was a better name.

There are many things in Neovim that are similar, but not exactly the
same. Using a same name would then be confusing. I believe this
applies to the job functions. Better get an error right away when using
a function that's different, than having to figure out what subtle
difference is causing a problem.

Different people have different opinions, that's life.


--
hundred-and-one symptoms of being an internet addict:
51. You put a pillow case over your laptop so your lover doesn't see it while
you are pretending to catch your breath.


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


You are receiving this because you commented.

Dennis B

unread,
Apr 7, 2018, 12:53:15 AM4/7/18
to vim/vim, vim-dev ML, Mention

There is a need for Vim 8 terminal colors 1 to 16 to be user definable. It is especially important for those of us who maintain Vim colorschemes.

The color issue is most pronounced in MacVim and gVim which are GUI programs and hence can not inherit any terminal colors. For instance FZF.vim, which now uses Vim 8 terminal, looks especially bad due to the default terminal colors chosen by MacVim and gVim. Allowing terminal color overides, like Neovim already provides, would solve the issue.

New highlight group names like TermColor1, TermColor2, etc makes sense as noted by @vim-ml.


You are receiving this because you were mentioned.

Bram Moolenaar

unread,
Apr 7, 2018, 4:59:34 AM4/7/18
to vim/vim, vim-dev ML, Mention

The most recent discussion is on issue #2747. I don't think there is anything else in this thread, so I'll close it. Please reopen if there is yet another issue that's not resolved by #2747.


You are receiving this because you were mentioned.

Bram Moolenaar

unread,
Apr 7, 2018, 4:59:38 AM4/7/18
to vim/vim, vim-dev ML, Mention

Closed #2353.


You are receiving this because you were mentioned.

Reply all
Reply to author
Forward
0 new messages