This is the standard behaviour of Vim. If
StatusLineNC have the same highlighting, the program will use the caret character (
^) in the status line of the current window (in order to highlight it).
This behaviour cannot be changed. The only thing that can be done is to change the caret to something else by the use of the
fillchars option. Like this:
set filchars=stl:+,stlnc:-. That way the current window and non-current windows will be marked by pluses and minuses in their status lines.
Unfortunately, setting spaces as the values of
stlnc doesn't affect the situation in the given circumstances. If Vim sees non-printable characters in the
fillchars values and there is no other way to differentiate windows, it adds carets to the status line of the current window automatically (and the equal signs to non-current windows if
Despite what was said before, there actually is a trick, which allows to have the same highlighting in status lines without carets to appear.
The thing is that Vim considers that current and non-current status line highlights are the same if both terminal and GUI colors match. When working in a terminal, you don't care what GUI colors are. So, they can be freely changed without affecting the editor look.
highlight StatusLine cterm=none ctermfg=white ctermbg=black guibg=red
highlight StatusLineNC cterm=none ctermfg=white ctermbg=black guibg=green
That way Vim won't consider that status lines are the same and won't add any indication to the status line of the current window.
Strangely, this trick doesn't work for the GUI version of the editor. When setting the same GUI foreground and background colors for both status lines along with different terminal background colors, carets still appear.
Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line
of the current window.
Characters to fill the statuslines and vertical separators. It is a comma
separated list of items:
item default Used for
stl:c ' ' or '^' statusline of the current window
stlnc:c ' ' or '=' statusline of the non-current windows
Normally, inversion is used to display the status line. This can be changed
with the 's' character in the 'highlight' option. For example, "sb" sets it
to bold characters.
If no highlighting is used for the status line ("sn"), the '^' character is
used for the current window, and '=' for other windows.
This option can be used to set highlighting mode for various occasions. It
is a comma separated list of character pairs. The first character in a pair
gives the occasion, the second the mode to use for that occasion.
The occasions are:
s status line of current window
S status lines of not-current windows
The display modes are:
n no highlighting