Live data from Hacker News

The Traditional Vi (2007)

ex-vi.sourceforge.net

51–60 of 61 posts

Re: The Traditional Vi (2007)

#51
post #40

Earlier quoted context omitted.

Any interesting reading on the second paragraph?

I can't think of any, but I can share some examples. When shredding things like log files, or raw data file, being able to do things like: :g/bad line/d To delete all of the "bad lines". When manually paring down some files, you can use `ma` to do "Mark A" (vs `mb`, which is Mark B). So, I can be scrolling through the file, do the mark when I get to the top of a garbage section, and page or scroll or search to the ne…

I'm roughly at the same level. The main improvement of vim over vi is the infinite undo, and more recently the UTF-8 support. I like the more elaborate status line and the syntax colouring, and I actually have cpoptions set to "downgrade" a few (but not all) features to how they were in vi ( notably vx$ so text you're changing remains visible while you're typing over it, and Esc actually executes the command line).

Re: The Traditional Vi (2007)

#52

Earlier quoted context omitted.

Is still around, at least for some values of "around". Elvis, at its latest release (2.2.0) is a required part of Slackware, part of the A (essential system) package series. I have it installed on my system, alongside Plasma 6.7 and kernel 7.1.

I suppose, but you can only install it via the AUR or nixpkgs on linux, and 2 out of the 4 BSDs no longer have ports. Sure, you can compile from source but when it's that old I consider such a state effectively no longer around

> you can only install it via the AUR or nixpkgs on linux

I just said that it comes already installed (because is a required, essential part of the system) in Slackware.

Slackware is a Linux distribution, just as Arch or NixOS.

So, install Slackware, and elvis comes bundled and installed in your Linux.

Re: The Traditional Vi (2007)

#53
post #31

Earlier quoted context omitted.

ZZ is the first vi command I learned. After typing vi and only seeing a column of ~s, I asked how do I get out of this thing. Someone answered - ZZ .

Did they say "zz" or specify [capital] "ZZ"?

They probably said Shift - ZZ

Re: The Traditional Vi (2007)

#54
post #39
post #37

I started writing a more fleshed out vi compatibility mode for TextAdept earlier this year. As someone who understood the basics after going through :vimtutor multiple times but always struggled with the more "advanced" commands, there's no better way to actually grok vi than to just try to recreate it. It's pretty amazing how much Bill Joy managed to pack in. Of course, if you're implementing POSIX vi, there are qui…

> Of course, if you're implementing POSIX vi, there are quite a few features that have aged poorly, like roff/troff macros and line-editing What do you mean by "roff/troff macros"? EDIT: Ah, you're probably talking about the "section-wise" movements, defined in POSIX with language like "A line whose first character is a and whose second and third characters match a two-character pair in the 'sections' edit option (se…

Yep, those are the ones! There's also the oddity of the [[ and ]] motions. In the POSIX standard, those are the only two-character motions. I was using a state-machine to implement motion commands, and that single command threw a wrench in the works. Of course, vim took two character commands and ran with it, so in vim [ can be followed by a whole host of characters that all do different things. Since g was not mapped in vi they also did the same thing there.

Re: The Traditional Vi (2007)

#55

Earlier quoted context omitted.

I suppose, but you can only install it via the AUR or nixpkgs on linux, and 2 out of the 4 BSDs no longer have ports. Sure, you can compile from source but when it's that old I consider such a state effectively no longer around

> you can only install it via the AUR or nixpkgs on linux I just said that it comes already installed (because is a required, essential part of the system) in Slackware. Slackware is a Linux distribution, just as Arch or NixOS. So, install Slackware, and elvis comes bundled and installed in your Linux.

I mean, if that's the case, then there's an argument to be made that SCCS is still a valid VCS because it comes with FreeBSD

Re: The Traditional Vi (2007)

#56
post #15

Earlier quoted context omitted.

Incorrect. :x is a vi feature, that was introduced by Mary Ann Horton to actual Joy+Horton vi in February 1980. * https://code.illumos.org/plugins/gitiles/illumos-gate/+/refs... Ritter's vi is derived from Joy+Horton vi. Illumos has the original.

Fascinating! I wonder what fork of vi I landed on that didn't have :x for me to have mis-picked-up that bit of trivia.

Only Ritter vi is really a fork. All of the rest are clones, ground-up reimplementations not forked from the Joy+Horton code.

Of them, and discounting the extreme fringes like vi-likes that run on the BBC Micro, only STEVIE lacks :x, and its derivatives all added it in. All of the other clones from MKS onwards, even neatvi and nextvi, have :x .

* https://jdebp.uk/FGA/vi-family.html

Re: The Traditional Vi (2007)

#57
post #56

Earlier quoted context omitted.

Fascinating! I wonder what fork of vi I landed on that didn't have :x for me to have mis-picked-up that bit of trivia.

Only Ritter vi is really a fork. All of the rest are clones, ground-up reimplementations not forked from the Joy+Horton code. Of them, and discounting the extreme fringes like vi-likes that run on the BBC Micro, only STEVIE lacks :x, and its derivatives all added it in. All of the other clones from MKS onwards, even neatvi and nextvi, have :x . * https://jdebp.uk/FGA/vi-family.html

Wow. Thank you.

Re: The Traditional Vi (2007)

#58
post #9

Earlier quoted context omitted.

or ZZ to save and exit

28 years of vi and TIL about ZZ. Thanks friend! ^_^

You are welcome! I’m happy to hear it!

I teach a vi basics tutorial and I get that a lot. :)

http://vitutorial.org/

The tutorial is based on Bill Joy’s original paper introducing the vi editor.

Maybe you’ll find something else new there. :)

Re: The Traditional Vi (2007)

#59

Earlier quoted context omitted.

> you can only install it via the AUR or nixpkgs on linux I just said that it comes already installed (because is a required, essential part of the system) in Slackware. Slackware is a Linux distribution, just as Arch or NixOS. So, install Slackware, and elvis comes bundled and installed in your Linux.

I mean, if that's the case, then there's an argument to be made that SCCS is still a valid VCS because it comes with FreeBSD

That was not the question. The point is, elvis is still around. This is relevant because is a required, essential part (not at all optional) for an actively developed Linux distribution, which coincidentally is the oldest Linux distribution still actively maintained and developed.

The package you mention (SCCS) might be offered as a FreeBSD port, maybe, but I'm certain it's not a required part of the system.

Re: The Traditional Vi (2007)

#60

Earlier quoted context omitted.

I mean, if that's the case, then there's an argument to be made that SCCS is still a valid VCS because it comes with FreeBSD

That was not the question. The point is, elvis is still around. This is relevant because is a required, essential part (not at all optional) for an actively developed Linux distribution, which coincidentally is the oldest Linux distribution still actively maintained and developed. The package you mention (SCCS) might be offered as a FreeBSD port, maybe, but I'm certain it's not a required part of the system.

I'd have to check, but I'm 90% sure sccs is included in base, meaning it's 'required' (you can most definitely remove it or not compile it, but if it's in base it's installed by default so unless you can't remove elvis without bricking slackware these are functionally equivalent)
Post reply on HN