Sometimes (about once/twice a day), when I open a file in vim, I get a strange line containing meta control characters right at the top of the buffer.
The line goes away when I refresh the buffer, so it's not really a problem.
I'm just curious to know why it happens. I run vim in a terminal and I'm on ubuntu 18.04.
$> vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 17:31:41)
Included patches: 1-1453
I've used vim on various machines for many years, but my current laptop is the only one where I've seen this happen.
$TERM
set to in your shell inside that terminal?termguicolors
set. Make sure your terminal actually understands that.^[[2;2R
) looks like the reply to a DSR sequence (Device Status Report). I think it reports the cursor position; here row 2, column 2. The second CSI sequence (^[[>1;5202;0c
) looks like the reply to a Send Device Attributes sequence (CSI > Pp ; Pv ; Pc ; c
). It's claiming that the terminal type is VT220 (because herePp
is 1), and that its firmware/patch version is 5202 (because herePv
is 5202).^[]10;rgb:0000/0000/0000^G
) is to change the text foreground color, and the last OSC sequence (^[]11;rgb:e0e0/e0e0/e0e0^G
) changes the text background color. You can find all of this information on: invisible-island.net/xterm/ctlseqs/ctlseqs.html I guess some program sends those sequences to get some info about the terminal and to change some of its attributes, but the terminal doesn't understand them. As already said, it's often an issue withTERM
, or maybe some Vim terminal-related options (:set termcap
,:h termcap
).