Joshua Smith
Joshua Smith

Reputation: 3809

Having trouble opening vi on a remote linux machine in Lion's Terminal

I just upgraded to OS X 10.7 (Lion), and when I ssh into a remote linux machine, vi is acting very goofy. Emacs works OK, and ssh'ing into localhost works OK, so I'm guessing there is something odd about the Lion VT100 emulation.

Here's an example of what I'm seeing:

$ ssh -l root somelinuxserver
Linux 2.6.29.6.
root@somelinuxserver:~# vi /etc/hosts
reading /etc/hosts
Read /etc/hosts, 4 lines, 45 chars
[a bunch of spaces about this long][]<--Block Cursor Here

Any idea what settings I need to change to get this to work?

(I'm an Emacs user on my local machine, but for some bizarre reason, I prefer to edit files on remote servers in vi. If I open emacs, I start typing j to move down a line. It's weird.)

Upvotes: 2

Views: 1509

Answers (1)

Michał Šrajer
Michał Šrajer

Reputation: 31182

you can try one of:

TERM=vt100 vi
TERM=xterm vi

Upvotes: 4

Related Questions