Closed skeept closed 11 years ago
This is my statusline:
set statusline=\(%n\)\ %f\ %#Modified#%m%r%*\ (%l/%L,\ %c)\ %P%=%h%w\ %y\ [%{&encoding}:%{&fileformat}]\ \
In my colorscheme (vim-colorscheme-vombato) I have defined the Modified highlight group; :help stl
I now have
hi Modified guifg=black guibg=#FFA500 set statusline=%2.2n\ %t\ %h%#Modified#%m%r%=%l/%L\ %2c\ %P let g:smartusline_string_to_highlight = '%2.2n\ %t\ %h%#Modified#%m%r'
the hi line is copied from you colorscheme. But the plugin doesn't seem to work any more with these settings. Any idea what I am doing wrong?
I think you should restore the highlight group after %r
with %*
, also you should probably tell smartusline to highlight only the part before the modified flag: '%2.2n %t %h', but I have not tried it. You should also not escape stuff inside single quotes. Try this:
hi Modified guifg=black guibg=#FFA500
set statusline=%2.2n\ %t\ %h%#Modified#%m%r%=%l/%L\ %2c\ %P
let g:smartusline_string_to_highlight = '%2.2n %t %h'
Thank you, your suggestion works. This is what I have now:
hi Modified guifg=black guibg=#FFA500 set statusline=%2.2n\ %t\ %h%#Modified#%m%r%*%=%l/%L\ %2c\ %P let g:smartusline_string_to_highlight = '%2.2n %t %h'
Hi,
I have the following settings:
set statusline=%2.2n\ %t\ %h%m%r%=%l/%L\ %2c\ %P let g:smartusline_string_to_highlight = '%2.2n %t %h%m%r'
In the picture you show as an example the modified indicator ([+]) has a different color from the rest of the text but in my case it always stays the same.
Do you know how I can make it a different color? Thank you.