stray control characters appear on vim startup

29 views
Skip to first unread message

John Passaro

unread,
Oct 16, 2017, 4:22:19 PM10/16/17
to vim...@googlegroups.com
Sometimes when I open a new vim session, unpredictably, various characters appear on the first line, they look like they are terminal control characters but I don't know for sure.

For example:
;2R^[[>0;95;0c

They go away as soon as I type over them or redraw the screen.

This doesn't happen consistently or according to any predictable pattern (at least not that I can discern). It only started relatively recently, and I don't recall that I've updated vim or made any changes to my environment that might have prompted it (I'm using xterm, bash-4.4, vim 8.0).

Does anybody have any idea how I can investigate this?

Thanks in advance!

Tim Chase

unread,
Oct 16, 2017, 4:39:36 PM10/16/17
to vim...@googlegroups.com
On 2017-10-16 16:21, John Passaro wrote:
> Sometimes when I open a new vim session, unpredictably, various
> characters appear on the first line, they look like they are
> terminal control characters but I don't know for sure.
>
> For example:
> ;2R^[[>0;95;0c
>
> They go away as soon as I type over them or redraw the screen.

This sounds suspiciously similar to

https://stackoverflow.com/questions/29939026/what-is-the-ansi-escape-code-sequence-escc

> Does anybody have any idea how I can investigate this?

I'd start by checking your $TERM settings both in your shell:

$ echo $TERM

and within vim:

:echo $TERM

and see if they're the same. Based on your description, I imagine
they both *should* return "xterm" but possibly some variant such as
"xterm-color256" or some other such suffix.

-tim

Bram Moolenaar

unread,
Oct 16, 2017, 5:14:26 PM10/16/17
to vim...@googlegroups.com, John Passaro
That looks like the xterm version string (but probably not in xterm).
When this happens, what does this do:
echo v:termresponse

Do you execute a shell command during startup?

--
Nothing is impossible for the man who doesn't have to do it.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

John Passaro

unread,
Oct 16, 2017, 6:50:37 PM10/16/17
to Bram Moolenaar, vim...@googlegroups.com
On Mon, Oct 16, 2017 at 5:14 PM, Bram Moolenaar <Br...@moolenaar.net> wrote:

John Passaro wrote:

> Sometimes when I open a new vim session, unpredictably, various characters
> appear on the first line, they look like they are terminal control
> characters but I don't know for sure.
>
> For example:
> ;2R^[[>0;95;0c
>
> They go away as soon as I type over them or redraw the screen.
>
> This doesn't happen consistently or according to any predictable pattern
> (at least not that I can discern). It only started relatively recently, and
> I don't recall that I've updated vim or made any changes to my environment
> that might have prompted it (I'm using xterm, bash-4.4, vim 8.0).
>
> Does anybody have any idea how I can investigate this?

That looks like the xterm version string (but probably not in xterm).
When this happens, what does this do:
        echo v:termresponse
^[[>0;95;0c
(the "^[" at the beginning is green text, in case that is important)
Does this tell us anything useful? It does seem to overlap with the string I'm seeing.


Do you execute a shell command during startup?

Not to my knowledge, though it is possible one of my plugins is doing so.

A S

unread,
Oct 16, 2017, 11:40:29 PM10/16/17
to vim_use
On Monday, October 16, 2017 at 9:22:19 PM UTC+1, John Passaro wrote:
> ;2R^[[>0;95;0c

Add this to your .vimrc

set t_u7=
set t_RV=

Reply all
Reply to author
Forward
0 new messages