1

I am using vim under GNU screen via ssh on a remote machine. When I visually select text, the text normally appears as reversed (highlighted) to indicate that it is selected. However, after a while working (switching screen windows, detaching, reattaching...) the visually selected text appears as underlined.

Why is this behavior, and can I somehow prevent it?

I prefer visually selected text to stay always reversed, otherwise it is very confusing.

-- versions used: VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 15 2016 13:40:39). Included patches: 1-4. Screen version 4.00.03 (FAU) 23-Oct-06

6
  • 1
    Are you overriding your TERM environmental variable in any shell startup scripts? What's the value of TERM outside screen, and within screen, and within Vim?
    – Heptite
    Commented Mar 8, 2017 at 17:16
  • Inside screen: "screen". Outside screen: "xterm-256color". Within VIM: I do not know how to check this.
    – user50105
    Commented Mar 9, 2017 at 12:09
  • 1
    The command would be ":echo $TERM" but it's unlikely to be anything unusual. What does the output of ":verbose set t_Co?" (with the question mark as part of the command) show?
    – Heptite
    Commented Mar 10, 2017 at 4:46
  • :echo $TERM "screen"
    – user50105
    Commented Mar 10, 2017 at 12:34
  • :verbose set t_Co? "t_Co=256 Last set from ~/.vimrc"
    – user50105
    Commented Mar 10, 2017 at 12:34

1 Answer 1

0

A discussions on vim_use suggests that X server disconnection is one--if not the only--cause for this. There supposedly is a fix for this in 8.1.0615.

You must log in to answer this question.