Closed XiaochenCui closed 7 years ago
There are two highlight groups you'll need to change (well, just one if you don't use cursorline
). LineNr
sets the color for the numbers, and CursorLineNr
sets the color for when you have :set cursorline
enabled. You can do this in two ways. I prefer the first (vimrc
override method) method because it won't conflict with any future changes to the color scheme, but both will work.
vimrc
Override in your .vimrc
(or init.vim
) by putting autocmd ColorScheme * highlight ...
calls just above where you set colorscheme eldar
, as per StackOverflow:
if has('autocmd')
augroup coloroverride
autocmd!
autocmd ColorScheme * highlight LineNr ctermfg=DarkGrey guifg=DarkGrey " Override LineNr
autocmd ColorScheme * highlight CursorLineNr ctermfg=White guifg=White " Override CursorLineNr
augroup END
endif
silent! colorscheme eldar " Custom color scheme
Edit eldar.vim
and change these lines:
let s:ColourAssignment['LineNr'] = {'GUIFG': 'DarkGrey'} "
let s:ColourAssignment['CursorLineNr'] = {'GUIFG': 'White'} "
In both cases you'll want to replace DarkGrey and White with your preferred colors.
@agude Thanks
After I changed the background image in terminal, the line number can't been recognition clearly. Like below:
How can I change the color of the line number? Thanks.