[SOLVED] TERM=xterm-256color vi only show 1 line problem
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
using slackware 64 13.37, when I switch $TERM from linux to xterm-256color, from /usr/share/terminfo/x/xter-256color, program vi only show 1 line, and will not fill up my xterm screen, how do i fix this problem.
if I switch $TERM back to linux or xterm, vi will fill and show on entire xterm screen, but they only has 8bit colors.
I wonder if we can have this in a future ‘etc’ Slackware package, since it affects more than just vi/elvis. For example, readline’s horizontal-scroll-mode is ignored when TERM is xterm-256color and it isn’t in /etc/termcap. Might as well add xterm+256color and the 88 colour versions, too.
On my machine I've decided to remove the termcap package, then rebuild a few of the stock Slackware packages so they link to ncurses (which uses terminfo) instead. It seems to make most of these kinds of problems go away. One less package to install, one less thing to go wrong...
The process goes something like this:
Recompile bash using --with-curses, then reinstall it (so that we can still use bash after the next few steps).
Remove the libtermcap package.
Rebuild aaa_elflibs without the libtermcap files, then reinstall it. libtermcap is now gone.
Next we want ncurses to fill in where we removed libtermcap. Rebuild the ncurses package with a couple of modifications. Remove the part where termcap.h gets renamed to termcap-ncurses.h to avoid clobbering the one from libtermcap since this isn't necessary anymore. Add compatibility symlinks from libtermcap.{a,so} to libncurses.{a,so} (search the Slackbuild for "Olde obsolete names" where we already do something similar) so that anything trying to link to libtermcap will instead get linked to ncurses. Reinstall after rebuilding.
We no longer need the termcap-{BSD,Linux} files in /etc. Rebuild the etc package without them, also without the part of doinst.sh that copies one of these to /etc/termcap. Reinstall after rebuilding. It's now safe to delete /etc/termcap, which is a leftover from this package.
Rebuild and reinstall at least the following stock Slackware packages so they'll link to ncurses instead of libtermcap: a/bash (in case you skipped the first step, but this time --with-curses isn't strictly needed), x/xterm, a/elvis, a/tcsh, a/procps, n/gnupg, n/gnupg2, n/tftp-hpa, n/mtr, ap/jove, l/pilot-link, kde/analitza, d/ruby. I found these using "objdump -x $FILE | grep NEEDED" on all the executable and library files I could find. There may be others. You may have other non-stock packages that need to be rebuilt.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.