Hello, While using vim in screen, I would get the warning : tgetent: warning: termcap entry too long Using the arrows in vim would write character instead of moving the cursors, the keypad is useless... Changing the TERM variable to 'linux' and restarting vim resolves the problem. Using another program using ncurses (mutt and nano) with the same term is ok. Reproducible: Always Steps to Reproduce: 1.screen 2.vim foo 3. Actual Results: Warning message, some character aren't handle correctly. Arrows print character and add lines. Expected Results: Move the cursor Portage 2.0.51-r3 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9 i686) ================================================================= System uname: 2.6.9 i686 AMD Athlon(tm) XP 2000+ Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -mcpu=athlon-xp -march=athlon-xp -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/ config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=athlon-xp -march=athlon-xp -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks sandbox" GENTOO_MIRRORS="http://mirror.usu.edu/mirrors/gentoo/ http://mirror.datapipe.net/gentoo http://prometheus.cs.wmich.edu/gentoo http://gentoo.binarycompass.org" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow acpi apm arts avi berkdb bitmap-fonts bzlib chroot crypt cups encode f77 foomaticdb fortran gdbm gif imlib jpeg libg++ libwww mad mbox mikmod mmx motif mpeg mysql nls oggvorbis opengl pam pdflib perl png python quicktime readline samba sdl spell sse sse2 ssl svga tcpd truetype x86 xml2 xmms xv zlib"
Does USE="ncurses" fix it?
I've been having the same problem, starting in the past week or so. With TERM=screen, vim just hangs at startup, and only killing the screen window can stop it. I get no messages regarding a termcap unlike the original poster. Other ncurses programs are fine. I have USE="ncurses vim-with-x" for vim. When run as root with TERM=screen, vim will eventually start, but takes around 15 seconds (usually instant). TERM=linux is again instant. emerge info here: http://www.halffull.org/gentoo/emerge.info
Hm, ok. When you're running inside screen, do you have X started? Is vim-with-x the problem?
X has always been running in the background, but that may not be the problem - After some more testing, it only seems to happen when I'm connected via SSH to the machine. When I'm local (using screen or not, and no matter what TERM), vim is instant. When I'm local and SSH into myself, it hangs for 10-15 seconds. When I'm remote and SSH into myself, it hangs indefinitely (or at least a very long time). I did some tests where I'm local and SSH into myself, with various TERMs. With my default TERM, rxvt (in aterm), vim hangs around 10 seconds at start. With TERM=linux, it starts instantly (but is almost unusable with that keymap). With TERM=screen, it again hangs ~10 seconds (but is useable). I apologize if I brought in an unrelated issue to this bug.
Having USE="ncurses" resolves the problem, thanks.
Jonathan -- ok. ncurses is generally a good one to have enabled globally, many apps fall back on termcap if terminfo (ncurses) is unavailable, and termcap is pretty archaic and h0rky. Thomas -- looks like your issue is unrelated. Please open another bug if you'd like further investigation.
For reference, my problem was indeed with SSH, specifically the DISPLAY variable hanging vim - see this bug: http://bugs.gentoo.org/show_bug.cgi?id=70884