Is it possible to change the coloring for the command line in vim? I realize that may be somewhat ambiguously stated, so I have some things that should clear it up a little. This image illustrates what I'm talking about:

enter image description here

Shown are two lines of the file I'm editing, or in the particular case, the help file I'm viewing, then the status line and finally the command line I'm talking about. All I want to do is turn that command line's foreground and background colors to the same as the status line above it.

I would assume this is a simple hi ______ guifg=#… guibg=#… in my colorscheme file, I'm just not sure what the selector is for that line. Can anyone offer any help? I haven't seen this happening in any screenshots of other configs, so I'm not sure if it's impossible or just uncommon.


The Vim cmdline uses the same colors as Normal text and doesn't have its own highlight group.

| improve this answer | |

I tested killistan's answer to a similar question with the following:

:hi Normal ctermbg=Black ctermfg=Black cterm=NONE
    au CmdLineEnter * hi Normal ctermfg=DarkGrey
    au CmdLineLeave * hi Normal ctermfg=Black
augroup END

And they are mostly correct. This will change the colors in the CmdLine only when you first enter it, after about four seconds, all text in the Normal group will change to match it. When you exit the CmdLine all text immediately changes back.

So, if you put something similar in your vimrc you could at least have the two matching while you were in the CmdLine.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.