Vim 在 byobu 中显示错误的颜色

Vim 在 byobu 中显示错误的颜色

我想使用 gruvbox 插件提供的主题,它在 byobu 之外可以工作,但在我进入时却不行。

我尝试过许多不同的解决方案,包括tmux 中的 Vim 显示错误的颜色

但似乎没有什么作用。

如果有人有不同的解决方案,我会很高兴。我正在使用 Ubuntu 20.04.3 LTS。

echom "Customized vimrc sourced"
set tabstop=4 softtabstop=4
set shiftwidth=4
set nu
set noswapfile
set smartindent
set incsearch
set scrolloff=8
set colorcolumn=80
set signcolumn=yes
"set term=xterm-256color
highlight ColorColumn ctermbg=0 guibg=lightgrey

syntax on 
filetype plugin on

let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
      silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
        autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
    endif

call plug#begin('.vim/plugged')
Plug 'https://github.com/bpstahlman/txtfmt'
Plug 'gruvbox-community/gruvbox'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'jiangmiao/auto-pairs'
Plug 'bfrg/vim-cpp-modern'
call plug#end()

"If I uncomment the lines below vim shows no color in byobu
"if exists('+termguicolors') && ($TERM == "xterm-256color" || $TERM == "tmux-256color")
"   let &t_8f = "\<Esc>[38;2;%lu;%lu%lum"
"   let &t_8b = "\<Esc>[48;2;%lu;%lu%lum"
"set termguicolors
"endif

注意:我正在使用 Ubuntu 20.04.3 LTS。

相关内容