Score:0

Vim displays wrong colors in byobu

th flag

I want to use the theme provided by the gruvbox plugin, which works outside of byobu but not when I enter it.

I have tried many different solutions including the ones shown in Vim in tmux display wrong colors

but nothing seems to work.

I'd be glad if someone had different solutions. I am using 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

NB: I am using Ubuntu 20.04.3 LTS.

David avatar
cn flag
Since this is Ask Ubuntu first question I will ask is what version of Ubuntu are you using?
th flag
I am using Ubuntu 20.04.3 LTS
David avatar
cn flag
Please add that to the question via an edit.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.