0

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

enter image description here

2) start vim

enter image description here

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

enter image description here

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

enter image description here

5) exit vim and hit enter a couple of times

enter image description here

  • 3
    What is echo $TERM here? Also, what does :set term? report in Vim? – muru Dec 22 '16 at 7:10
  • TERM is set to screen-bce (defbce on in my .screenrc is a workaround for another bug) vim's :set term is term=screen-bce ... so it looks like vim is picking up the terminal type from the environment correctly. Whether it knows what to do with a screen-bce terminal is anyone's guess. – Gregory Nisbet Dec 22 '16 at 7:13
  • Maybe this topic will help you? stackoverflow.com/a/15279464/1199156 – grodzik Dec 22 '16 at 7:40
  • Does pressing <C-l> fix it? – Martin Tournoij Dec 31 '16 at 3:50
  • @Carpetsmoker inside vim or in the shell? For the moment, I'm working around the problem by using color codes in my shell prompt, which resets the color. – Gregory Nisbet Dec 31 '16 at 4:00
3

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="\<Esc>[38;2;%lu;%lu;%lum"
"let &t_8b="\<Esc>[48;2;%lu;%lu;%lum"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.