-1

So I've been increasingly making use of Vi for quick file edits, and have actually become fond of it (strange, i know)

Anyhow, on *buntu 20.04+ vi behaves as if it's drunk.

The arrow keys can't be used for navigation (although they can on 18.04, embedded Linux versions, Ubuntu server, etc) and there are many other oddities. what gives? is there an easy fix, and if it's by choice: WHY?

rasmus91
  • 200

1 Answers1

1

You're confusing vi with vim

vi is the legacy program, written back when dumb terminals didn't have arrow keys, thus letters had to be used. Even if some terminals had arrow keys, the terminals weren't all compatible with each other (vt52 etc).

vim is the vi improved with extra functionality, including arrow keys. It's a 'universe' program so is manually added (though Lubuntu does include it).

I believe you're confusing vim and vi.

I'm old, and learnt vi because it worked on all dumb terminals, inc. those that didn't have arrow keys (at university)... before IBM pc's with their arrow keys... using letters was necessary for editing

guiverc
  • 30,396
  • vi runs vim on my Lubuntu system... It's setup as alternative way of running vim, meaning a user of the system runs vim when they type vi... this has likely confused you. – guiverc Dec 08 '20 at 12:11
  • which vi resolves to /usr/bin/vi or /bin/vi on all systems I can find to test it on, is this because it's aliased or symlinked? – rasmus91 Dec 08 '20 at 12:14
  • stat shows /usr/bin/vi -> /etc/alternatives/vi where following that stat shows /etc/alternatives/vi -> /usr/bin/vim.gtk3 .. ie. entering vi causes vim.gtk3 to run on my system (heavily modified Lubuntu, with Ubuntu's GNOME, Xubuntu's XFCE also installed...) yeah symlink – guiverc Dec 08 '20 at 12:20