Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

vim and x11 issue

This was posted previously in SL installation and setup and it was suggested it be reposted here:

I am used to using vim in an xterm (X11) window. After SL installation, my X11 windows operate
normally, until I try to open a vi session in them: the vi session opens, but uses only about 20 lines
of a 60 line window, and worse, when the vi session is closed, scrolling seems to be inhibited in
future use of the window, so that when the cursor gets to the bottom of the window, output from
commands simply overwrites the last line of the window. Macvim the gui interface seems to work
nicely, but it is difficult to get out of the habit/expectation that vi/vim can work sensibly in an X11
window. Any advice or suggestions would be most welcome.
RK

mac Pro, Mac OS X (10.6.1)

Posted on Oct 2, 2009 5:22 AM

Reply
4 replies

Oct 2, 2009 8:17 AM in response to roger koenker

I do not have Snow Leopard, so I can not test this, so these are general questions.

Do you have to use X11? Can you use Terminal or iTerm?

Note, you can ssh into other Unix systems and run Vim on the remote system (the way I use Vim all the time; and I still use X11 for exporting other Unix X-Window displays back to my Mac; I just do not use xterm).

Is it the Mac OS X xterm or an xterm X-Window display exported from another Unix system?

If you really prefer xterm running on Mac OS X, have you considered providing your own via something like MacPorts.org. You can get xterm, kxterm, rxvt, and I'm sure there are others available.

What is your TERM environment variable set to? Generally this kind of screw up is a problem with the Terminfo database. You could try alternate TERM settings.

If this is a remote xterm, then I assume it is also the copy of Vim running the remote Unix system. That Terminfo on that system for your TERM value may be having issues with Mac OS X xterm (it shouldn't, but I'm just trying to diagnose).

If a the local xterm and Vim, then is this the Vim provided with Mac OS X, or do you build your own from sources? I build my own, mostly because I want additional features that have previously been excluded in the Mac OS X build.

Again, I do not have Snow Leopard, so I'm just playing 20 questions hoping something good will come out of it.

Oct 2, 2009 9:34 AM in response to BobHarris

I don't have to use X11's xterm, but old habits die hard. I'm using vim
downloaded as binary, I wasn't aware that vim was provided by OS X:
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jul 13 2009 22:28:10)
Included patches: 1-108
Compiled by _mdnsresponder@pactla.apple.com
So this appears to be Apple's version, but a little digging and firing
up my old version hidden away in /Applications produces the same
behavior.

I'm doing so locally, although gvim remotely is also very nice, and
hasn't caused any problems. My TERM setting is xterm-color, using
xterm produces the same behavior described previously, vt100 my
only other attempt produced slightly different behavior in which vim
used only the first 20 lines, but subsequent commands scrolled
properly, but only in the first 20 lines of the window. This seems to
be a hint -- but I don't know what it is whispering.....

Thanks, very much for you suggestions

vim and x11 issue

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.