[CentOS] Semi-OT: very weird vi behaviour

Valeri Galtsev galtsev at kicp.uchicago.edu
Wed Apr 27 14:23:06 UTC 2016


On Wed, April 27, 2016 8:39 am, m.roth at 5-cent.us wrote:
> This is weird. As in, *deeply* weird.
>
> I ssh as root from one box to another (there are keys involved), and I go
> to vi a file, such as
> # line 1 #
> # line 2 #
> # line 3
> # line 4
>
> And what I see in vi is
> # line 3
> # line 4
>
> BUT, if I scroll the cursor over each line with the arrow key... I see all
> four lines. I've also looked at another file, and same thing. Just checked
> it out on the server I ssh'd in from, and no problem.  And now, I just
> ssh'd in from another windows, same way... and the weirdness isn't there.
>
> Anyone have any clues as to what's going on with that one session?
>

Mark, I can not reproduce it. I ssh (with the key) from FrraBSD 9.3 box
(from either /bin/sh Bourne shell or /usr/local/bin/bash Bourne again
shell) to centos 5 (fully updated, bash shell), and my vi does behave as
expected, it is:

which vi
/bin/vi

vi -V

~
~                              VIM - Vi IMproved
~
~                               version 7.0.237
~                           by Bram Moolenaar et al.
~                 Vim is open source and freely distributable


I guess we need more detail about what you have.


Here is the file I open with vi:

cosmo ~]# cat test
# line 1 #
# line 2 #
# line 3
# line 4

Here is what I see when I open it with vi:

cosmo ~]# vi test

# line 1 #
# line 2 #
# line 3
# line 4
~


Valeri

>          mark
>
> file
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos
>


++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++



More information about the CentOS mailing list