The vi family

(lpar.ATH0.com)

81 points | by hggh 6 days ago

14 comments

  • nineteen999 1 hour ago
    I consider my vi/vim skills to be extremely minimalist subset, and probably horribly inefficient, since they were developed to work accross a broad range of UNIX systems (SCO, Solaris, HP-UX, OSF, AIX) and I rarely add anything to my vim configs on top of that other than syntax highlighting.

    But I'd still rather use it than just about any other text editor, just for the simplicity of that muscle memory alone. I have way more stuff to keep in my head than I have room for and I can't afford to expend more than about 0.0001% of context on a text editor.

    • userbinator 25 minutes ago
      Likewise, I'm also not very demanding of my text editor. I used vi on any *nix systems and Notepad (the original one, not the new bloated monstrosity) on Windows for most of my work. Navigation, basic editing, and searching are probably all I need.
    • elektrontamer 41 minutes ago
      Same. I barely edit default configs. I also mostly use emulators provided by whatever ide I use.
  • ventana 1 hour ago
    One thing I noticed that with Claude Code and Codex running in the terminal, I tend to use VS Code much less than before, and found myself opening files in vim more often. It just looks like, for me, the agent development brings me back to using the basic tools, like many years ago, before VS Code existed.
    • raimo 1 hour ago
      Yes indeed, same here!
  • helterskelter 27 minutes ago
    If anyone wanted to write a minimal vi-style helix clone they should call it 'ix', as it's derived from helix, gives a nod to 'vi' and a wink at the turning of vi syntax on its head, like rotating a six to make a nine. Then a descendent of 'ix' could be called 'six', and we'll have come full circle.
  • grebc 1 hour ago
    Interesting the history is varied for such a simple tool.

    I am but a lowly mouse/GUI user so rarely have to dwell in a shell, but I learnt the basics of vi in my 1st year of university and never forgotten. Gotten me out of many a pickle being able to reliably edit a file quickly.

    • normie3000 46 minutes ago
      ...and presumably quit vi once you're done!
  • keithnz 42 minutes ago
    I had a mini holiday job working for (long since gone from NZ) Philips Design and Development Laboratory in 1992. As part of that I worked on some tools for their silicon graphics workstations. I was shown vi, and how to get help and left to it. Tough learning curve! Seemed ridiculous at first, then I developed a mini set of editing skills and got used to it! Still using Vim/Nvim today.
  • rekoros 52 minutes ago
    When I was in college in 2001, I went to the library and checked out Kaare Christian's book called "The UNIX Operating System". One of the early chapters covered vi - I'd telnet into the school's Sun server with a pretty early version of vi (one-level undo) and follow the examples. Never looked back!
  • taejavu 1 hour ago
    How does an article like this not mention Bill Joy??
  • yanis_t 16 minutes ago
    It’s funny how many forks aiming to keep it free from LLM-generated code. The luddites are present even in the most progressive parts of the population.
  • classichasclass 1 hour ago
    Long ago I wrote my own really incomplete vi subset for the C64 that I really should dust off. But there's a more polished vi clone for 6502 machines, including the C64, Apple II and Atari: https://vi65.sourceforge.net/
  • be_erik 2 hours ago
    The history and endurance of vi is impressive. I never thought I would be using the same editor today that I started using in the mid 90s because it was more l33t.

    The comments about LLM contributed code seems like a specific axe to grind that otherwise detracts from a nice history lesson.

    • rmunn 1 hour ago
      I started learning vi around the same time, but in my case (since I was expecting to work on Unix systems for decades, which has proven true) it was "because it'll always be there." I.e. if you're SSHing into a server to fix a problem, it's possible that /usr/bin/emacs won't be there (perhaps the problem you're fixing is that /usr isn't mounting), but you can nearly always count on /bin/vi being available: if you can access the server at all, you will be able to access vi, so at least learn its basic keystrokes, our prof told us.

      That advice was not entirely accurate (sometimes vi is in /usr/bin/vi, for example), and the merging of /bin with /usr/bin has made it kind of a moot point. (EDIT to add: Though the fact that busybox includes a basic vi implementation has kind of un-mooted the point, actually). But I first started learning vi because I figured I would need it professionally, and when the modal-editing workflow "clicked" for me, I figured out that I had just learned the editor I would want to stick with for years.

      And although vim replaced vi and nvim replaced vim in my finger-macros, that has remained true to this day.

      • sgtlaggy 1 hour ago
        > if you're SSHing into a server to fix a problem, it's possible that /usr/bin/emacs won't be there

        You don't need emacs on a server. TRAMP is built-in and can open remote files in a local instance over SSH, SMB, FTP, ADB, or docker/podman.

        • rmunn 49 minutes ago
          Never really learned emacs so didn't know TRAMP existed. When was it created? I was given that advice ("vi will always be available on the server") in the late 90's so I'm curious to know if TRAMP was an option my prof didn't know about (or didn't mention), or whether it was developed later and the advice was good at the time.

          EDIT: Found http://www.fifi.org/doc/tramp/tramp-emacs.html which mentions that TRAMP started development in November 1998. I would have been getting that advice in late 1997 or early 1998, given when I started my Unix class at college. So the answer appears to be that the advice was actually correct at the time, but superseded sooner than I thought it was.

        • pmontra 49 minutes ago
          Yes, I can use TRAMP but as I ssh to the server anyway to run commands, I'm editing the files with vi there. Furthermore I'm sure I don't inadvertently edit the local version of the file instead of the remote one, or that I forget to kill the buffer with the remote file and edit it instead of the local one after a few days. What's on the server stays on the server.
    • normie3000 37 minutes ago
      > The comments about LLM contributed code seems like a specific axe to grind that otherwise detracts from a nice history lesson.

      The existence of vim classic would be hard to explain without reference to LLMs.

    • Scarbutt 1 hour ago
      The comments about LLM contributed code seems like a specific axe to grind that otherwise detracts from a nice history lesson.

      Seems like an interesting fact for those who don't follow the development of vim/neovim.

  • openmarkand 6 days ago
    I'm vim poweruser since around 2009. When I use VSCodium (not that much today) I obviously use Vim emulation.

    When I use a different editor, there will be lots of jjkk or ,w (I nmap ,w to :w). Habits die hard.

    Now I switched to neovim due to the amount of good features I like with it. I use exclusively mini.nvim modules that are awesome.

  • casey2 2 hours ago
    Sam isn't graphical there is sam and samterm which sends commands to sam. sam itself is an ed style line editor, where the concept of a line is replaced with a dot. vis allows multiple dots.

    It's worth noting that a lot of the text editing done in the vi family are just calls to ed with different ways of doing selections.

  • saidnooneever 6 days ago
    cool stuff, for a bunch i didnt realise they were really distinct versions!

    Use Helix now as the first one that stuck in my fingers though. before that it was always try a lil while and forget it (back to nano...).

    Helix i think is like 'user friendly vi' or maybe 'no config vi'. dont need any plugins or weird stuff. everything essential works out of the box (for me)

    • 16bitvoid 33 minutes ago
      Helix's selection-action feels way more natural to me than vi/vim's action-selection.
  • DeathArrow 1 hour ago
    I have nothing against Vi or Emacs, but since I strongly prefer GUI and mouse over terminal I use GUI editors.

    When I don't have a GUI available, I use micro, nano, joe.

    • pjio 3 minutes ago
      Being able to choose is a good thing. Use what works for you. I prefer the terminal, but not as hard core as switching to a TTY and never see a GUI again...