I want highlight the rulerformat in my .vimrc.
I have
set ruler
set rulerformat=%55(%{strftime('%a\ %b\ %e\ %I:%M\ %p')}\ %5l,%-6(%c%V%)\ %P%)
I have subsequently tried all of the following:
hi rulerformat ctermbg=1
hi rulerformat ctermbg=red
hi Group1 ctermbg=red "if you modify the rulerformat slightly you can try to access group 1
I don't necessarily want it to be red, but I thought that would stand out the most; anyway, I just cannot get it to work, and I didn't really find anything online (a somewhat unintensive search yielded nothing much). So, how does one highlight the rulerformat?
                        
-- edit --
I think I completely missed the point of your question.
What you seem to want is not a way to highlight the value of
'rulerformat'in yourvimrc(as your repeated emphasis on rulerformat, your title and your introductory sentence imply) but your actualruler, at the bottom of the window.This is easy to achieve if you follow the instructions at
:help 'statusline':But you would already have a solution if you cared to read:
-- endedit --
The value of
'rulerformat'is highlighted by default but not as a whole: each character is highlighted individually according to the rules defined in$VIMRUNTIME/syntax/vim.vim.If you want to highlight the whole value with a single color, you will need to add your own rule to your
vimrc: