Question

When I have many files open in split viewports, it takes effort to identify the location of my focus. Even though I tried to work around this problem by highlight the cursor using cursorline, the highlight occurs in all respective viewports. So is there a way to highlight the title of file when it is in selected? If not, Any solutions for easy-identification would be appreciated.

Was it helpful?

Solution

Good Colorschemes usually have highlight definitions for StatusLine (current window) and StatusLineNC (other windows).

If your colorscheme doesn't, just find the line for StatusLine, duplicate it, change StatusLine into StatusLineNC and just put the colors you want.

For reference, here are the two relevant lines from the colorscheme that I use:

hi StatusLine term=bold,reverse cterm=bold ctermbg=101 ctermfg=16 gui=bold guibg=#808070 guifg=#000000
hi StatusLineNC term=reverse cterm=NONE ctermbg=59 ctermfg=16 gui=italic guibg=#404c4c guifg=#000000
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top