Ansi color sequences from vim bleeding into prompt in GNU Screen

2018-06-07 18:35:33

So, when running vim under gnu screen and using a color scheme, some of the color sequences bleed into the prompt after I close the program. This only happens under gnu screen, and not when I'm not running a terminal multiplexer. It also doesn't happen under tmux FWIW.

I'm not sure whether GNU screen or vim is the culprit here. Other editors that use colors like jed, joe and gnu emacs do not leave stray colors.

How do I configure either screen or vim to not do this?

Steps to reproduce and visual proof:

Sorry if the screenshots take up a lot of space, I can cut it down, but I think this makes the problem obvious.

1) start gnu screen

2) start vim

3) this is vim without any color scheme turned on.

4) turn on the industry color scheme (note that the filetype plugin is not on, so the whole thing is bright white).

5) exit vim and hit enter a couple of times

I had a similar problem when messing with my VIMRC file. Seems that these let lines were causing

  • I had a similar problem when messing with my VIMRC file. Seems that these let lines were causing the trouble, commenting them fixed the problem.

    Hopefully it helps someone stumbling into this same problem.

    "" Theme and colors

    set termguicolors

    "let &t_8f="\[38;2;%lu;%lu;%lum"

    "let &t_8b="\[48;2;%lu;%lu;%lum"

    2018-06-07 18:38:00