Vim command line color setting

Nowadays NeoVim has the feature. MsgArea color group. e.g.

:hi MsgArea guifg=#03ff13

screenshot


This can be done with autocommands:

hi Normal=white guifg=white
au CmdLineEnter * hi Normal ctermfg=cyan guifg=cyan
au CmdLineLeave * hi Normal ctermfg=white guifg=white

Surprisingly to me, this only affects the CmdLine, not everything else.

I had expected all the normal text to change color immediately when entering the CmdLine. Without the CmdLineLeave, the change to the normal text everywhere happens, but only after getting out of the command line; which explains why it does what we want.

Note that I am using vim from a terminal, so I am using ctermfg instead of guifg; but I anticipate that it will work the same way with a gui version of vim.

You may also want to highlight the ModeMsg.


No, not that I know of.

Not without messing with Vim's source.

The command line is under Normal highlighting group.