2

More specifically, in Vim if I press escape twice (and under some other circumstances too) I get this character appearing:

http://www.fileformat.info/info/unicode/char/1b/index.htm

It can be replicated by typing echo, then Ctrl-V, then escape

Here's what it looks like:

terminal output

I've tried changing the font and TERM setting, neither of which make a difference. No other terminals I've tried (xterm, urxvt, that KDE console) have the same behaviour.

What I'd like to know is whether this is a bug or intended behaviour, and if there's any workarounds

2
  • On a related note, for anyone who is having the same issue with Vim, the cause is the visualbell setting. Placing set novisualbell in the vimrc seems to sort it
    – benwh
    Sep 3, 2012 at 22:45
  • This is a known bug in vte (gnome-terminal): bugzilla.gnome.org/show_bug.cgi?id=403130.
    – egmont
    Oct 30, 2017 at 21:20

2 Answers 2

2

It's intended behavior. No typeface provides a glyph for that codepoint, so the font engine generates the default "codepoint-in-a-box" glyph.

5
  • 1
    So the intended behaviour of all of the other terminal applications is to suppress it?
    – benwh
    Sep 3, 2012 at 10:40
  • 1
    They use a different font engine. Sep 3, 2012 at 10:44
  • 1
    @benwh: I'm not sure if there's even an "intended behavior" for this specific character. ESC is the first byte of all "escape sequences" that control the terminal's behavior (move cursor, set colors, etc) – so technically, when a program outputs a bare ESC, the terminal sees it as an invalid escape sequence and can choose to print it out, or to discard it. Sep 3, 2012 at 10:47
  • 1
    how come all of the other terminal emulators know what to do with it? Nov 29, 2014 at 22:48
  • @QuinnWilson: They don't. They simply don't display anything since that's the behavior of their font engines. Nov 29, 2014 at 22:51
0

I ran across a similar problem because I had modified my .vimrc some time in the past to play nicely with MINTTY. Strangely, those modifications are not usually problematic in gnome-terminal, but they are if it's running on ARM.

In my case, commenting out this section of my .vimrc fixed it:

let &t_ti.="\e[1 q"                                                                                                   
let &t_SI.="\e[5 q"                                                                                                   
let &t_EI.="\e[1 q"                                                                                                   
let &t_te.="\e[0 q"                   

If you've modified those values, you might try removing those modifications

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .