lose vim colorscheme in tmux mode

后端 未结 20 1805
说谎
说谎 2020-12-12 09:13

I\'m running iterm2 and when I\'m in tmux mode the colorscheme I have set in vim does not show up. Only the color scheme I\'ve set in iterm. If I run vim from shell the colo

20条回答
  •  隐瞒了意图╮
    2020-12-12 09:23

    I'm using gnome terminal and this solved the problem, but (0) don't forget to:

    killall tmux
    

    (1) Edit .tmux.conf

    # 24 bit color
    set -g default-terminal "tmux-256color"
    set -ga terminal-overrides ",*256col*:Tc"
    

    (2) Edit: .vimrc

    " Enable true color
    if exists('+termguicolors')
      let &t_8f = "\[38;2;%lu;%lu;%lum"
      let &t_8b = "\[48;2;%lu;%lu;%lum"
      set termguicolors
    endif
    

    Solution posted by rinetd on tmux repo issue: https://github.com/tmux/tmux/issues/1246

提交回复
热议问题