Vim background with gnu screen

前端 未结 3 1176
挽巷
挽巷 2020-12-19 06:08

I am having trouble with my colorscheme in vim. When editing a file using a vim session started in GNU screen, the text background is not rendered correctly. In

相关标签:
3条回答
  • 2020-12-19 06:14

    To make vim, bash, and screen settings work together:

    1) In .bashrc add the following:

    export TERM=xterm-256color
    

    2) In .screenrc add the following:

    altscreen on
    defbce on
    set term=screen-256color
    
    0 讨论(0)
  • 2020-12-19 06:16

    [filling in for the OP, see the comment]

    The OP found the issue:

    I needed to have this set:

    defbce "on"
    

    This forces background colours to refresh.

    "Change background-color-erase setting. If bce is set to “on”, all characters cleared by an erase/insert/scroll/clear operation will be displayed in the current background color. Otherwise the default background color is used."

    – Ravi 19 hours ago

    0 讨论(0)
  • 2020-12-19 06:36

    As explained here, disable Background Color Erase (BCE) by clearing the t_ut terminal option (run :set t_ut= in Vim and then press Control+L to refresh the terminal's display) so that color schemes work properly when Vim is used inside tmux and GNU screen.

    0 讨论(0)
提交回复
热议问题