vim dracula主题中未突出显示数字窗格 [英] Number pane not being highlighted in vim dracula theme

查看:102
本文介绍了vim dracula主题中未突出显示数字窗格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为vim使用.

解决方案

行号列的背景是 起作用.

请参见:help'termguicolors'.

  • 直接编辑颜色方案:

      hi LineNr ctermfg = 60 ctermbg = 242 cterm = NONE guifg =#6272a4 guibg =#282a36 gui = NONE 

    我已经任意选择了 242 ,但是您可以在 vimrc 中覆盖颜色方案:

     功能!MyHighlights()中止嗨LineNr ctermfg = 60 ctermbg = 242 cterm = NONE guifg =#6272a4 guibg =#282a36 gui = NONE终端功能augroup MyColorsautocmd!autocmd ColorScheme *调用MyHighlights()augroup结束吸血鬼 

  • 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.

    解决方案

    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 the gui* attributes instead of the cterm* 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 chart

    • Override 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
      

    这篇关于vim dracula主题中未突出显示数字窗格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆