2

If I change Vim's highlight setting, how do I "reload" it for colorschemes to take effect?

So, in my case, I remove highlight's cursor line number—

se hl-=N:CursorLineNr

Changing highlight from—

highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:Mor eMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,c:Vert Split,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:D iffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:Spel lCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine, #:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn

To

highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:Mor eMsg,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:DiffCh ange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRar e,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_: TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn

(I've emphasized the change.)

But the cursor line number is still "highlighted"!

Changing highlight doesn't update the colorscheme—so how do I "force" an update? I've tried setting syntax coloring off then on again and changing colorschemes to no avail.

(Cross-posted from StackOverflow.)

4

Your settings look very unreadable and mashed together. Is this your .vimrc file? If so you can reload it with

:source $MYVIMRC

or if it's some config file your .vimrc doesn't select for you, you can source that file directly as

:source ~/.vim/path/to/configfile.vim

or similar.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.