Upgraded vi-editor to latest version

Post tutorials, HOWTO's and other useful resources here.
nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Upgraded vi-editor to latest version

Post#1 by nanZor » 17 Apr 2019, 00:30

Porteus uses the Busybox version of the vi editor. That rocks.

But sometimes there may be bugs fixed that you may not want to wait for until the next Porteus release. AND, perhaps you don't want to do the whole Busybox linking setup, but just want the latest little "app", like vi.

A TinyCore user noticed a bug in a complicated regex and pushed that bug upstream, and it got fixed in the latest release (1.30) of BB. Thanks to the Busybox crew for fixing it.

Here is the quick hack so you don't have to go whole hog with busybox itself:

1) Download the binary from the Busybox project appropriate to your hardware. In my case, I got the i686 version of "busybox_VI"

https://busybox.net/

2) move that into your path, which for me begins with /usr/local/bin/

3) As root, make it executable, chmod+x ./busybox_VI. Use your own chmod depending on your needs if you like.

4) That's a bummer to type, so I renamed it "bvi". This way I'll be sure to be using the newest version, and if something breaks and it doesn't fire up I'll know to use the normally linked Porteus vi.

Of course there's vim, elvis, nvi and so forth. For me, the busybox version of vi suits me just fine. This isn't perhaps the most elegant way to upgrade, but it works.
That's a UNIX book - cool. -Garth