Re: FreeBSD 5.1: VI munges config files?

From: Gregory Toomey (nospam_at_bigpond.com)
Date: 02/18/04


Date: 18 Feb 2004 01:43:02 GMT

xippy dapinhead wrote:

> Hi All: I'm very new to FreeBSD and only have experience with Linux
> 7,8,9.
>
> I've been trying to admin a 5.1 installation using SSH and vi to edit
> config files. When I log in as root and start to edit in vi, strange
> things happen in the terminal window, like the cursor jumping to the
> far right and not inserting text properly.
>
> I usually panic at that point <g> and try to exit without saving
> changes, but when I've opened the same file in gedit, it will have
> become corrupted...I'm hoping that it's because I inadvertently saved
> the file while vi was wigging out, and not some larger file corruption
> issue.
>
> Is this a known issue or, if not, what can I do to debug the problem?
> I will eventually want to remotely access the server with SSH and edit
> files with vi reliably.
>
> TIA, Andrew

Possibly the TTY type is set wrongly. In bash try

export TERM=vt100

or maybe even

export TERM=xterm

and then run vi

gtoomey



Relevant Pages

  • FreeBSD 5.1: VI munges config files?
    ... I've been trying to admin a 5.1 installation using SSH and vi to edit ... I will eventually want to remotely access the server with SSH and edit ...
    (comp.unix.bsd.freebsd.misc)
  • FreeBSD 5.1: VI munges config files?
    ... I've been trying to admin a 5.1 installation using SSH and vi to edit ... I will eventually want to remotely access the server with SSH and edit ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Reconfiguring network interfaces
    ... and I'd prefer to do it over SSH without losing connectivity where ... I know I can use ifconfig, or edit /etc/rc.conf directly ...
    (freebsd-questions)
  • Re: [suse 9.1] strange characters in tty
    ... Midnight Commander over SSH. ... It is suggested not to edit /etc/bash.bashrc as future SuSe updates ...
    (alt.os.linux.suse)
  • Re: [SLE] Two pcs (9.0), access one way only
    ... > identification on the machine that you can't ssh to. ... time, get a different ip-adress for some host, than the one the other hosts ... > that you access (the lines wrap quite a few times on my screen). ... Which means that you have to make sure that whatever editor you use to edit ...
    (SuSE)