问题
I am using dracula theme for vim and am not able to get the number pane, that is, the side panel which contains the line numbers, to be displayed in a sort of translucent manner. The preview image shows that it's possible.
How the terminal should look like
How it actually looks
To fix this issue, I think I need to configure some attributes accordingly, but being a beginner, I don't know which ones, therefore any help and guidance would be appreciated.
As a reference, these are my dotvim files.
回答1:
The background of the line numbers column is set in the colorscheme to NONE
for color terminals and #282a36
for GUIs:
hi LineNr ctermfg=60 ctermbg=NONE cterm=NONE guifg=#6272a4 guibg=#282a36 gui=NONE
From there you have three options:
Enable the
'termguicolors'
option so that Vim uses thegui*
attributes instead of thecterm*
attributes.This is how the screenshot was taken but it will only work in select terminal emulators.
See
:help 'termguicolors'
.Edit the colorscheme directly:
hi LineNr ctermfg=60 ctermbg=242 cterm=NONE guifg=#6272a4 guibg=#282a36 gui=NONE
I've chosen
242
arbitrarily but you can choose whatever color you want in this chartOverride your colorscheme in your
vimrc
:function! MyHighlights() abort hi LineNr ctermfg=60 ctermbg=242 cterm=NONE guifg=#6272a4 guibg=#282a36 gui=NONE endfunction augroup MyColors autocmd! autocmd ColorScheme * call MyHighlights() augroup END colorscheme dracula
来源:https://stackoverflow.com/questions/48945518/number-pane-not-being-highlighted-in-vim-dracula-theme