1. 22
  1.  

  2. 24

    A few things that were missed: POSIX / the Single Unix Specification require vi. That’s a big part of why it’s ubiquitous, every *NIX system that aims for POSIX compliance needs some vi clone. *BSD shipped nvi, because it’s small and they have a separation of base system and third-party things, so people who want a richer editor can install one (including vim) and only pay a tiny cost for nvi being installed. Linux distros picked vim. I have no idea why this was (early Linux distro creators liked it? They assumed everyone would want a richer vi clone?), but once it became the standard Linux vi, everyone learned it. I was hoping that the article would give some insight into this.

    The first shell and editor that you use seem very sticky. I still use bash and vim on pretty much every system, even when they’re not the default on a system (neither is on FreeBSD). The SSH factor is still the main thing keeping me in vim. If the VS Code remote extension weren’t so tied to x86/Linux, I’d probably use that, but since it doesn’t work with ARM, MIPS, FreeBSD, and so on, I can’t rely on it everywhere and so I don’t want to have to switch between tools.

    1. 5

      I also find this post very sparse on information. For example, it doesn’t really make any sense of the path of punch cards to line editors. Line editors existed because early terminals were not “glass terminals” as we have them now, but hard copy terminals in which you interacted with a printout, one line at a time appearing as you typed in the commands, at which point it makes sense you don’t have a full-screen editor; there wasn’t even a screen.

      1. 3

        Another reason was that other options (such as Emacs) used to cost a lot of money and effort to get installed, because there were no simple package-distribution mechanisms as we now have.

        1. 11

          And if you go even further back, to the days when it was really just “vi” instead of “vim”, Emacs was FAR more resource-intensive, which mattered a lot on shell hosts you were sharing with a bunch of other users. When I was in college, we joked it stood for Eight Megs And Constantly Swapping. Obviously not an issue at all these days but that was one of the things that steered me away from Emacs when I was first learning to use UNIX.

          1. 5

            When I studied at KTH in Sweden in the early 90s the Sun dickdiskless workstations we used had 2 windows open when an X session started: a shell (I believe it might have been tcsh but this was before I actually cared about these things) and an Emacs session. All documentation regarding how to edit text assumed Emacs.

            I guess my Emacs usage started there. I played with Emacs-like editors on the 386 I had at time (running Windows 3.1) just to keep the keybindings.

            I know enough vi to be able to edit a local apt-source list to install Emacs ;)

            1. 1

              That probably confirms the point David was trying to make: defaults stick with us.

              Lovely “typo” and how you left it in btw :)

            2. 2

              I was actually thinking of the pre-vim times, AFAIK it as already possible to distribute the Emacs source via FTP when vim started to become popular.

              1. 1

                emacs - eight megs and constantly swapping

                1. 3

                  My first PC had 2 megs so I couldn’t run Emacs on it - nor install Debian, for that matter.

            3. 2

              *BSD shipped nvi, because it’s small and they have a separation of base system and third-party things, so people who want a richer editor can install one (including vim) and only pay a tiny cost for nvi being installed.

              One other minor point - *BSD ships with nvi because the original vi (although originall Berkeley-developed) contained encumbered AT&T copyrighted source code. nvi is a re-implementation of vi by Keith Bostic, based partially on elvis, and included initially with 4BSD.

              1. 2

                The first shell and editor that you use seem very sticky. I still use bash and vim on pretty much every system, even when they’re not the default on a system (neither is on FreeBSD).

                I’d imagine you’re half-right about this. If only vi is available on some system, many choose to install vim. But I think it is less common even to notice that the shell is not bash.

                1. 4

                  The first thing i do after installing Void linux is changing from dash to bash and vi to kakoune.

                  Dash is just unusable as a day to day interactive shell. It is probably not meant to.

                  After learning kakoune i can’t stand using any type of vi.

                  1. 3

                    How many years did you use vi?

                    I’ve tried to use kakoune but there are many vi(m)-isms which stop me. It’s not the plugins; I use like 2.

                    For me, vim-sneak is the biggest one for movement. Can kakoune do similar movement?

                    1. 3

                      I don’t know. I’ve been using Linux since Mandrake Linux almost 18 years ago and always used vim because it was the default. I just recently started programming so i never used vim intensely in the past, it was always simple tasks so i never acquired too much knowledge in it. Just wrote some bash scripts.

                      When i tried kakoune it simply felt more natural for me and the instant feedback and multiple cursors is wonderful. It’s when i started learning programming.

                      I don’t know about vim-sneak. Looking briefly at the website, it seems that you perform a search and it highlights the results and you can jump around? If i search for “as” i can jump to the third instance by typing ‘3n’. If i hold shift it selects all the instances in the way. So 3 + shift + n will select the next 3 instances.

                      1. 2

                        I used Vim daily for like twenty years before trying Kakoune, and after a couple of months (which, I admit, were a bit awkward and frustrating) I can’t go back.

                        I don’t know of any equivalent to vim-sneak (although there is an easymotion plugin) but because of the way Kakoune deals with selections instead of cursors movement has a very different feel — it’s not just about moving the cursor to the right place, but also moving the anchor (the other end of the selection) to the right place at the same time. When I started out, it felt a little bit like playing that Snake game on old Nokia phones, always being conscious of where your tail was.

                        My suspicion is that a Kakoune equivalent of vim-sneak wouldn’t be nearly as useful as it is in Vim. On the other hand, it’s pretty easy to build Kakoune plugins, and that might be a decent tutorial project.

                      2. 2

                        As far as I remember the ksh in OpenBSD was surprisingly usable as a daily driver despite having only like 3 features: line editing, tab completion of command names and tab completion of file names.

                        1. 0

                          This is a tangent but for anyone with a passing knowledge of Greek or French etymology “kakoune” is an unfortunate name.

                          1. 4

                            Here, broaden your linguistic horizons a bit.

                            1. 1

                              Interesting. Is “{en|in}close” specific to how the editor works? I thought it was a modal editor with alternative verb/noun nomenclature than vim.

                              As much as I’d like to learn Japanese, learning French was hard enough, and I can’t unsee kakoune as a (ungrammatical) gloss on “the shitty one”.

                              1. 5

                                Kakoune’s major innovation relative to vi(m) is specifying the object before the action, which also neatly enables (SublimeText-style) multi-select. You enclose some text and then operate on it. Japanese puts nouns before verbs too.

                                But on the shell, it’s usually just called kak. So, yeah, kind of a cuss… kek!

                            2. 2

                              My understanding is that the primary author of Kakoune is from French-speaking New Caledonia, where the word means “a hard punch”. I don’t know if that’s a meaning borrowed from some Polynesian language, or a novel invention, but I’m sure the author was aware of the variant reading you’re thinking of.

                          2. 1

                            I think that depends on what the other shell is. OS X used to ship with tcsh as the default (and the rest of the BSD family still does). Installing bash was one of the first things I did on a Mac and apparently this behaviour was so common that Apple switched to bash as the default shell some time around 10.3ish. Solaris, last time I used it, shipped with an incredibly minimal POSIX shell by default, so bash was one of the first things I installed. If I use a system where the default shell is zsh, for example, I typically don’t care.

                          3. 1

                            Linux distros picked vim.

                            Not all of them! My beloved Slackware defaults vi to elvis and vim is a separate command. I actually kinda like elvis - it has a kind of wysiwyg html mode that is somewhat cool among other little thing. Lightweight too.

                            Though vim i my main editor for bigger jobs.

                          4. 9

                            But how did vim achieve fame? It had a bunch of excellent features at that time, and it was compatible with vi. Features and compatibility attracted a lot of folks to use it.

                            Since I’m currently reading Crossing the Chasm, this text connected. The chasm is between the early adopters and the early majority. The difference is that early adopters desire change while the early majority desire productivity improvement without change. WIth a focus on backwards-compatibility, maybe vim has unintentionally crossed the chasm which devoured so many other vi-clones?

                            1. 2

                              You described it so nicely! I think that was it.

                              1. 1

                                You may be on the mark there. neovim has completely replaced vi/vim for day-to-day use for me - :terminal is just such a life changing command (when combined with splits) that almost any other deficiencies would be worth the pain. (Such as the extremely awkward ^\ ^N sequence to escape the terminal, so I just use the mouse instead.)

                              2. 1

                                I mean, the answer is basically “path dependence”, no?