Reputation: 65
I'm using Kubuntu 15.10, konsole and vim. When I initially start vim in konsole, i get strange symbols ("115;0c") in my command line, which is really annoying.
i tried "set term=konsole" setting in my .vimrc but i got this
E558: Terminal entry not found in terminfo
'konsole' not known. Available builtin terminals are:
builtin_gui
builtin_amiga
builtin_beos-ansi
builtin_ansi
builtin_pcansi
builtin_win32
builtin_vt320
builtin_vt52
builtin_xterm
builtin_iris-ansi
builtin_debug
builtin_dumb
defaulting to 'ansi'
but all of these options were annoying, because i got "trace" after closing quiting vim.
Does anyone have the same problem? I'd appreciate any help.
Upvotes: 2
Views: 845
Reputation: 54583
The problem was that konsole was pretending to be xterm, and confused vim. That "115;0c" was intended (by konsole's developer) to look like the response to xterm's secondary device response. In particular, konsole was pretending to be xterm patch #115, by sending this response:
Escape
[
1
;
1
1
5
;
0
c
konsole, like all of the xterm-wannbes, differs from xterm in ways that affect any application using terminfo (this is of course an FAQ).
The actual code:
void Vt102Emulation::reportSecondaryAttributes()
{
// Secondary device attribute response (Request was: ^[[>0c or ^[[>c)
if (getMode(MODE_Ansi)) {
sendString("\033[>1;115;0c"); // Why 115? ;)
} else {
sendString("\033/Z"); // FIXME I don't think VT52 knows about it but kept for
}
// konsoles backward compatibility.
}
dates back to this commit:
commit 2d93fed82aa27e89c9d7301d09d2e24e4fa4416d
Author: Waldo Bastian <[email protected]>
Date: Sat Sep 15 21:21:44 2001 +0000
proper impl. of primary/secondary device attributes (DA)
Patch by Achim Bohnet <[email protected]>
svn path=/trunk/kdebase/konsole/; revision=114396
diff --git a/konsole/TEmuVt102.cpp b/konsole/TEmuVt102.cp
There is a "konsole" entry in the optional ncurses-term package (see source). That requires a few megabytes. The required ncurses-base package is much smaller:
This package contains terminfo data files to support the most common types of terminal, including ansi, dumb, linux, rxvt, screen, sun, vt100, vt102, vt220, vt52, and xterm.
which is a little odd, because very few people have actually used ansi, sun, or vt52 within the past 20 years, except by accident or when following poor advice.
Upvotes: 0
Reputation: 126536
That usually indicates an incorrect TERM
environment variable setting -- when vim
starts up, it generates a number of terminal configuration commands base on the TERM
setting to configure the terminal. If the TERM
setting is wrong, it may generate an incorrect setting string that gets displayed like this.
For a konsole window, TERM
should be set to konsole
.
Upvotes: 1