Paul van Erk wrote:
Hi,
I'm having a problem with Vim 7.0.17's cursorline highlighting. When I have in
my .gvimrc 'set highlight cursorline', I get the next error in gvim:
highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,
+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine
It also happens when I have a default .gvimrc
The highlighting DOES work, though. What am I missing?
Grts,
Paul van Erk
What you did meant "what is the setting of the 'highlight' option? and
set 'cursorline' to TRUE". The message is not an error, it is the reply
to your question about 'highlight', which is not a boolean option. It
appears in black-and-white like ordinary messages, not in white on red
(or whatever depending on your color scheme) like errors do.
To set 'cursorline' on:
:set cursorline
To ask whether it is on or off:
:set cursorline?
To set it off:
:set nocursorline
To toggle it:
:set invcursorline
or
:set cursorline!
Similarly for 'cursorcolumn'. All these work only on Vim version 7 (and
later ;-) ) because 'cursorline' and 'cursorcolumn' were introduced in
that version. They work for other boolean options in earlier releases
that have them.
To ask in what color it is highlighted, or would be if it were on:
:highlight CursorLine
(without :set)
To set it to a very light shade of mauve in the GUI:
:highlight CursorLine guibg=#FFF4FF
(the value is #RRGGBB, where RR GG BB are red, green, blue, in hex 00-FF).
See
:help :set
:help 'cursorline'
:help 'highlight'
:help :highlight
Best regards,
Tony.