17 ms·
Bill Joy's greatest gift to man – the vi editor (2003)
- dieselerator 6y agotl;dr The Register interviews Bill Joy about writing vi over a very slow data link. I use vi (m) every day. Thank you, Bill Joy, and Happy Birthday whenever chron brings it up.
- abjKT26nO8 6y agoWhat is chron?
- PEJOE 6y agocron is a tool to schedule tasks see: http://man7.org/linux/man-pages/man8/cron.8.html http://man7.org/linux/man-pages/man8/cron.8.html and: http://man7.org/linux/man-pages/man5/crontab.5.html http://man7.org/linux/man-pages/man5/crontab.5.html
- abjKT26nO8 6y agoBut what does "chron" have to do with cron? Or was that a typo?
- PEJOE 6y agotypo on my part, but the etymology of "cron," is related to "Chronos," if you didn't know
- xwdv 6y agoThank you Bill Joy, no other tool in my programming career has been as impactful as vi, and all its iterations.
- JJMcJ 6y agoHe also created Berkeley sockets, which pretty much powers networking today.
- deleted 6y ago[deleted]
- smabie 6y agoI personally think that the Berkeley socket api is really really ugly. Plan9's networking api is very nice, though: https://9fans.github.io/plan9port/man/man3/dial.html https://9fans.github.io/plan9port/man/man3/dial.html
- JJMcJ 6y agoThe man page in the link has further links to source code. Seems like the API is built on top of sockets, which is not a bad idea. I certainly agree that sockets can get tedious.
- p_l 6y agothe plan9 port API is based on sockets, yes - because plan9port is a port of plan9 runtime to other OSes. However, BSD Sockets are bad API, and can be argued to be one of the reasons, if not major reason, behind many issues in IP-based networks, including slow IPv6 rollout. They also were a rushed port/rewrite of existing TCP/IP code done essentially by grad students on a grant from DoD because vendor (DEC) told DoD that they are not getting any new models of the computer they used primarily for TPC/IP. Part of the requirements was that the resulting code is shared so that vendors could quickly provide support for TCP/IP in various products.
- bdamm 6y agovi has been life changing. Learning vi altered my entire concept of what interacting with text could be, and even my personal physical relationship with a keyboard. Using vi is like driving a stick shift; satisfying in the depth of control once the learning curve is done. vi has been a daily friend now for over 20 years. So much insight is cooked into those little key mappings.
- scottlocklin 6y ago> So much insight is cooked into those little key mappings. Just a point of historical order, didn't those key mappings mostly come from ed? Aka Ken Thompson and Ritchie?
- gen220 6y agoyes they definitely do. ed -> ex -> vi It's fascinating to read comments praising how great it is that you can edit text without a mouse. ed was written to interface with tty systems, where mice weren't even a thing to be avoided. :)
- bdamm 6y agoIt's not about doing it without a mouse, it's about doing it fast, comfortably, and powerfully. Pointers are a useful addition to graphic capable vi implementations, but if you do everything with mouse or trackpad movements then I don't think you can claim the zen of vi.
- gen220 6y agooh to be clear, I totally agree. My fascination is that the original motions were not invented to escape the imprecision of graphical pointers, even though that's their main selling point today. They were invented to minimize (1) excessive tty printing, because printing is slow (2) keystrokes. That, in 2020, these optimizations made in 1960 allow you to avoid the imprecision and slowness of a graphic pointer, we get for free :)
- sunnytimes 6y agoI used to use vi all the time and the joke always was "vi is a four letter word"
- narrator 6y agoIt's amazing how fast one can edit text with vi once you get all the keys down. There used to be a video game that taught how to use VI. Is it still around?
- chakerb 6y ago> There used to be a video game that taught how to use VI. Is it still around? You're probably referring to https://vim-adventures.com/ https://vim-adventures.com/.
- fit2rule 6y agoThere are other great vi-inspired games, my favourite is Word War Vi ... http://wordwarvi.sourceforge.net http://wordwarvi.sourceforge.net :wq!
- umvi 6y ago> It's amazing how fast one can edit text with vi once you get all the keys down People say this, but I feel the same about VSCode. Once you know a few shortcuts (esp. the multi-select and multi-cursor shortcuts), you can make incredibly powerful bulk changes to a file. I wish there were a subreddit called "TextEditorWars" or something where a challenge is given, and you can submit a screen capture of you accomplishing the challenge as fast as possible in your editor of choice.
- zanellato19 6y agoCheckout vim golf if you are curious about its possibilities.
- skohan 6y agoSome things seem unnecessarily unintuitive to me about the shortcuts. For instance, using 4 in-line keys for navigating a 2D space seems like a wasted opportunity. Every video game ever came to the conclusion that the inverse-T layout is ideal for this task.
- saagarjha 6y ago
- steffan 6y agoLet's not forget Bram Moolenaar, who also deserves credit for extending the work on Vi. Vim [Vi iMproved] is likely (along with NeoVim) the actual Vi editor most people are using these days.
- globular-toast 6y agoThis is so often the case with long-running projects. People forget that the much of the work that went into the current product wasn't necessarily done by the original author. Everyone knows git is Linus Torvalds. But Torvalds constantly states that Junio Hamano deserves a lot the credit for making it the tool it is today. It sounds like a similar situation with vim.
- zabil 6y ago+1 and all the plugin authors for writing and maintaining plugins. I find Vim/NeoVim so good for working with JavaScript and Go thanks to it's design and ecosystem.
- skohan 6y agoWhat's the story with NeoVim exactly? I am trying it out on Linux because I got some recommendations that it's better than Vim, but I've run into some problems because for instance with setting up plugins and things, lots of times the documentation seems to be geared toward Vim, and sometimes I've gotten errors it's hard to figure out because of this. It kind of gives me the perception there just aren't that many people using it, so it might be one of those tools which is technically better but doesn't have the critical mass of community to really be useful. Am I off base there? I mean what are the tangible, user-facing advantages of NeoVim over Vim?
- maximusjesse 6y agoNeovim definitely has significant market share, you can compare Github stars as one statistic to consider: https://github.com/vim/vim https://github.com/vim/vim - 20k https://github.com/neovim/neovim https://github.com/neovim/neovim - 36.5k This is in some part due to the fact that neovim has been on Github longer, but it's still a a major indicator. Neovim has many benefits over Vim, and has been applying pressure on Vim for years to improve its own development and codebase. Nvim has first class support for Lua outside of Vimscript, which has enabled a lot of people to write more powerful plugins. A lot of NVim's featureset has been copied into Vim over the years (one of my favorites is the hover window, which has allowed IDE like support for code references/comments/source). Supposedly, Nvim's codebase is significantly easier to maintain and contribute to, due to the nature of having a community of contributors that built it from ground up, as opposed to one primary developer working on Vim. The parity has reduced over the years, but Nvim has been significantly ahead in pushing new features and active development over Vim resting on its laurels.
- asciimov 6y agoBTW it's :x to save and exit.
- rantwasp 6y agoZZ for the win (3 keystrokes vs 4 for :x)
- arunix 6y agoI use command mode a lot, so have swapped ":" and ";". With that, :x + enter is 3 keystrokes, and hitting x is a bit easier than hitting z.
- asciimov 6y agoI aliased it so either : or ; work for : I admit I typed :wq for more than a decade before learning about :x
- taborj 6y agoI've been doing :wq for so long that my fingers have already done it before I realize I should have done :x
- devchix 6y ago:wq! because I really mean it!
- rantwasp 6y agowhy not just :q! to live dangerously :)
- com 6y agoOMG. 30 years of using vi and this falls from the heavens. Thank you! I am a proficient vi user but it’s totally weird watching the keyboard of another vi user. Totally different (and probably better) keystrokes.
- bradford 6y agoMy career as a software developer is indebted to vi. text editing can be a thankless, soul-sucking chore without the proper tools. I've seen otherwise intelligent individuals abandon a software career because they never quite figured out how to efficiently do it. I wouldn't say that vi/vim is the only tool that can do the job, but it's the one that I've chosen. I was introduced to vi by a stroke of fate. My buddy in college pulled me aside and introduced it to me. I initially thought he we crazy because we had no shortage of schoolwork to do and vi just seemed impenetrably nuts. Really glad he did: my career might have taken a very different arc without that encounter.
- cbsmith 6y agoSad to see Bill Joy's contributions so minimized.;-)
- coliveira 6y agoI used Emacs for 5 years before learning vi. What a change! While Emacs tries to put the kitchen sink inside the editor, vi tries simply to be a keyboard interface to the rest of the system. I've never looked back since I learned this way of working.
- umvi 6y agoI've tried several times to get into vim. I feel like it's similar to dvorak though - unless you use it 24/7 you won't develop the muscle memory necessary to use it efficiently.
- KSS42 6y agoUsing it 12/7 was enough for me for me to be become proficient. ;)
- ztoben 6y agoIf it takes 84 hours a week of use in order to become proficient I think I'll pass.
- kleer001 6y agoMaybe 80 hours total, but then that's it. And then you have speedy skills that can serve you in almost any command line environment. AND vi commands are used in a lot of other places, like man pages and such.
- gen220 6y agosecond the sibling comment. it's an up-front cost, but it's one that you'll benefit a lot from over the years. I recommend starting with soft plaintext, like a diary. Over time, you can migrate to using it to edit code. My conversion took a couple months, and followed this pattern. I started by editing plaintext diary files. Then, once I was very use to the in-file navigation, I installed vim-mode on my editor of choice at the time, so I could benefit from efficiencies there, while keeping all the IDE benefits. Then, I began the process of replicating all of the features I used in my IDE, in vim. that took maybe another month, and was motivated by how painfully un-snappy my IDE was relative to vim. This is all to say, it doesn't have to be an all-or-nothing cutover. That would be painful and frustrating.
- draw_down 6y agoI find this and emacs so confounding to use. IMO, a lot of better choices out there.
- psim1 6y agoThe first editor I used was pico, then nano. I joined a sysadmin team shortly after college and they said they would not install those tools on the Sun servers; I had to learn vi. I wasn't prepared to argue but I wanted to know why. They said you'll find vi on almost every system and it will work fine in almost any terminal. To me there was a lot of value in that, and once I did learn vi, I liked it for all of the other reasons folks are mentioning in this thread.
- forrestthewoods 6y agoYesterday I spent an hour trying to figure out how to NOT use vi to make a Mercurial commit on macOS. It was one of my most frustrating computer experiences in recent memory.
- nouveaux 6y agoMy guess is that you ended up on a machine that has the default editor as vi. TO fix this, set your shell's EDITOR env variable to something like nano. I agree that VI's default is so different from the modern editor that it's very frustrating to get stuck in it. However, learning vi pays dividends.
- forrestthewoods 6y agoI tried setting the editor to TextEdit app path. That didn’t work. I also tried Sublime, which also didn’t work. Setting the editor is really a 3 step process. Add application to PATH. Create an alias. Specify the alias. VSCode has a command to do steps 1 and 2 for you. My next weekend project is to learn Vi. (Any tutorial suggestions?) I don’t want to. But I have to. Smartphones are so intuitive toddlers can use them. Vi is so non-intuitive it requires going to external tutorials to learn how to edit text. Sigh. :(
- triceratops 6y agovimtutor - it should already be installed on your system alongside vim
- projektfu 6y agoI think it’s hard to get EDITOR working with spaces in the path.
- nouveaux 6y agoUse vim adventures to learn. It will take the pain out of learning and will make you proficient in about a day. After that, force yourself to use it. Install vim plugin in vscode. In about 2 weeks, you will wonder why you didn't learn it sooner.
- taylodl 6y ago"Among Joy's list of achievements are BSD Unix, NFS, UltraSPARC designs and some work on Java" - not to mention Berkley Sockets. But his greatest gift to man was vi? I think not! Full disclosure: I'm an "emacs guy" but I don't care about the silly old emacs/vi wars. I would just say as awesome as people find vi to be, it's among the least of Bill's accomplishments. That's how awesome he is!
- PaulDavisThe1st 6y agoI don't know how much he was involved in the "3M" model that Sun pushed, but that was pretty big too: 1 Megabyte of memory, 1 megapixels on the screen, 1 Megabyte/sec network connection. All seems like nothing now, but at the time of the early Sun workstations, that was the definition of a high end machine.
- m463 6y agoI think more people should shoot for something like that. I remember when tesla first created it's electric cars and they put these huge expensive batteries in them. Other cars required an engineering degree to figure out how to get across town and back, and tesla had these cars that freed up your mind and let you drive. and then they could build on that with the supercharger network. Eventually the range went up and the battery cost went down and the future was the present.
- DonHopkins 6y ago"I wish we hadn't used all the keys on the keyboard." -Bill Joy Interview with Bill Joy from the August 1984 issue of Unix Review magazine: https://github.com/sysprv/vimrc/blob/master/joy84.html https://github.com/sysprv/vimrc/blob/master/joy84.html
- DonHopkins 6y agoOn Nov 8, 2018, I sent Bill Joy a birthday greeting: "Happy 17,179,869,184 MIPS Birthday, Bill"! (2 to the (year - 1984)) Bill Joy’s Law: 2^(Year-1984) Million Instructions per Second https://medium.com/@donhopkins/bill-joys-law-2-year-1984-million-instructions-per-second-3a8c92165cfe https://medium.com/@donhopkins/bill-joys-law-2-year-1984-mil... >The peak computer speed doubles each year and thus is given by a simple function of time. Specifically, S = 2^(Year-1984), in which S is the peak computer speed attained during each year, expressed in MIPS. -Wikipedia, Joy’s law (computing) >C++++-= >“C++++-= is the new language that is a little more than C++ and a lot less.” -Bill Joy >In this talk from 1991, Bill Joy predicts a new hypothetical language that he calls “C++++-=”, which adds some things to C++, and takes away some other things. https://en.wikipedia.org/wiki/Joy%27s_law_(computing) https://en.wikipedia.org/wiki/Joy%27s_law_(computing) >Introduction >These are some highlights from a prescient talk by Bill Joy in February of 1991. >“It’s vintage wnj. When assessing wnj-speak, remember Eric Schmidt’s comment that Bill is almost always qualitatively right, but the time scale is sometimes wrong.” -David Hough
- nouveaux 6y agoFor those who do not understand why people are fanatical about vi, here are some reasons: Vi is keyboard only. This means that actions with the mouse are optimized through the keyboard. There are "hotkeys" for most tasks you use with a mouse. Vi has the idea of objects. Words, lines and paragraphs are objects you can operate on. Vi defines a "language" for operating on objects. For instance, 'd' is delete. You can delete a word using 'dw'. You can delete 5 words with '5dw'. Another example: deleting a line is 'dd'. Delete 5 lines with '5dd' It is a modal editor. At a basic level there is an "edit" (insert) mode, a "navigation" (normal) mode, and a "selection" (visual) mode. The power of a modal environment means that commands and hotkeys now have a context and do slightly different things in different modes. While this may be overwhelming, once all these modes are ingrained in you, it allows you to be extremely efficient since you do not have to remember new hotkeys. For example, in the navigation mode, you can apply the 5dd to delete 5 lines. In selection mode, use '5w' to select five words. 'd' now deletes everything in the selection. If you've ever struggled to manage and remember your hotkeys, modal environment is your friend. (set this up in mac using something like hammerspoon.) It includes some really nice out of the box features: Macro system to save you time with repetitive tasks, regular expressions search and replace, time travel through your edits, it stores your edits in a tree so you can navigate to your changes even after multiple undo/redo. "." repeats the last change. You can also apply a number before it to repeat the change n number of times. I am surprised how often I use this that this is and this is first thing I miss when using another editor. Vi is worth learning as it will improve your productivity. This is especially important if you have to edit a file on a remote server. Vi is installed on every unix distribution. Many cli tools and shells have a vi mode. This allows you to take the vi 'language' to all these cli tools for more productivity. For those who struggle to learn, I highly recommend Vim Adventures. After that, force yourself to use vi for your every day edits and it'll be second nature in a couple of weeks. https://vim-adventures.com https://vim-adventures.com
- bdamm 6y agovi also builds its concepts together in a great way. Navigation keys are powerful, but combined with actions, they become monumentally powerful in a way few IDEs seem to replicate well. Something simple like "copy the next 10 lines to the clipboard" is just 10yj or 10Y or even y10j. No awkward reaching for control keys. Now combine those actions into macros and things get really fun. One of the most fun navigation keys is the under-reported "f" key. If the cursor isn't where you want it to be, you can easily put it on the right line (perhaps with 55G or something if you want line 55) and then to move the cursor over the character you are actually looking at you just type f( assuming that ( is the character you want the cursor on. It's just great... it's about having the computer work around your human experience of looking at the screen in a nice way.
- CalChris 6y agoDating myself, but I found vi fairly easy to learn since I had used TECO on DEC machines. I rather liked TECO. iHello World\n<escape> is the same in TECO and vi.
- riffic 6y agothe vi editor is a masterpiece for the ages. a true work of art.
- ben7799 6y agoVi is the ultimate example of software that is "easy to use" as opposed to "easy to learn", it is great that we still have Vi and so many other unix tools that use the same philosophy. One of the biggest things that has happened to computer software in modern times is the balance between "easy to use" and "easy to learn" has shifted dramatically towards "easy to learn". There is some software that can achieve both at the same time but IMO much of the time the two ideas are counterbalanced against each other with each hurting the other. Before the mouse almost all software was harder to learn but users would become extremely fast & efficient when they learned to use it. Vi is a classic example. So were lots of applications that had character cell user interfaces and function keys & shortcuts for everything. A lot of mobile stuff is the ultimate opposite.. it takes 2nds to learn but you're never going to be able to use it any more efficiently or quickly than you did 5 minutes after you first tried it.
- combatentropy 6y agoI agree. While vi has an unusually steep learning curve among software, I think of it sometimes when I design user interfaces. Design with the 2-week user in mind, not the first-time user. What I would call fraidy-cat designers work themselves into a tizzy asking themselves, yes, but will users like it or understand it the first time they see it? I encourage people to instead be a bit bold and ask, will the user grow to like it after using it for a week or two? There are three kinds of software: 1. Easy at first, and mediocre for the rest of your life. 2. Takes some getting used to at first, and awkward for the rest of your life. 3. Takes some getting used to at first, and wonderful for the rest of your life. I suppose there might be tools that are easy at first and wonderful for the rest of your life, but they are rare. Most classic tools are in the last category. And it's not just software. An audio engineer probably took a long time to learn how to use a mixing board, but now it's second nature. Manual focus on a professional camera, also something that's hard at first but effortless and even preferred after practice. The thing is, if you optimize for the first-time user, you might be blocking yourself from making something really powerful and simple, though at first strange. Some of the best things in life are at first strange. In case someone is still trying to read my post in bad faith, of course you should not make it harder than necessary for first-time users. Designing interfaces is hard work. This is not an excuse to be lazy. It is an invitation to make your software as good as possible for long-term users.
- downerending 6y agoIf the original vi used 'jkl;' for movement and put a startup message on the screen for newbies explaining how to exit, I'd probably be using it today. Turns out that was enough to send me on to glorious decades of emacs.
- neves 6y agoThe Unix Hater's Handbook is an excellent read: https://web.mit.edu/~simsong/www/ugh.pdf https://web.mit.edu/~simsong/www/ugh.pdf
- madmax108 6y agoRequired reading for anyone who uses Vi (or wants to take the dive) "Your problem with Vim is that you don't grok vi." : https://stackoverflow.com/a/1220118 https://stackoverflow.com/a/1220118 Anecdote time: Just a few hours back, I was working with a json file and needed a way to copy data between 2 matching parens in a Json node. 'v' is vi-speak for switching to visual mode '%' is vi-speak for skip to matching param 'y' is vi-speak for copy (or yank) So 'v%y' is for switching to visual mode and jump to matching param (which visual mode highlights text) and then copy the highlighted text. Ah, the joys of vim! Truly one of those tools that can elevate your whole productivity once you grok the basics! :)
- koonsolo 6y agoMandatory link for those who wonder "Why, oh WHY, do those #?@! nutheads use vi?" http://www.viemu.com/a-why-vi-vim.html http://www.viemu.com/a-why-vi-vim.html
- zzo38computer 6y agoI think vi is good. I think the modal editing is good. The ZZT external editor I wrote (ZZTQED, and later frezed) is inspired by features of vi, such as modal editing, numeric prefixes, macros, etc. It is also good that vi has the ability to interact with external programs by pipes, which is something that Heirloom-mailx also does and I like that, and my own NNTP client software (bystand) also does, but unfortunately the web browser doesn't (the web browser is one of the worst software). One problem with many newer programs is lack of good documentation as well as using mouse-based interface; I like to make most functions working by keyboard commands. A lot of existing software I don't like so much, so I try to write my own better ones, which can use pipes with external programs, using mostly keyboard-based interface rather than by the mouse, using UNIX philosophy, using you have enough ropes to hang yourself and also a few more just in case, etc, to do what I will think is a good idea to do. And yet, it isn't just a lot of computer software that is badly designed these days, but even user interfaces of VCRs, DVD recorders, etc. I don't really like MSE so much, so I wrote TeXnicard. I don't really like most NNTP software so much, so I wrote bystand. I don't like KevEdit so much, so I wrote ZZTQED. I don't like Inform so much, so I wrote Glasm. etc
- millstone 6y agoI watch in awe as vim experts fly with amazing speed. They have undeniable powers, built on top of highly personalized .vimrcs. And I try to learn, but get stranded in the very basics. Example is searching for text on my system clipboard. There's no way to do this in vim: it insists on interpreting special regex chars. If you google it, you will find line noise that you can paste into your vimrc; these solutions inevitably have caveats and are now personalized to you. (I asked our resident vim expert how he accomplishes this, and he seemed confused why you would ever need to do that. vim is its own universe, huh.) Anyways looking for practical suggestions for getting into vim - a "cheat sheet" that has actually worked for someone!
- ulisesrmzroche 6y agoHighly overrated, and I’ve been using Vim professionally (or vim emulators) for ten years now. I’m just used to the keys - muscle memory - but that’s it. (Its actually my first editor, my first job was at a place with a lot of vimsters) There’s no proof that it makes you more productive or a better programmer. It’s actually gonna trip you up and get in your way if you don’t soup it up like an IDE Downvote away
- mckinney 6y agoOk, I get that vi is a legend etc. I think I understand why, but I'll keep that to myself. But honestly, it's a relic. Hell, it was a relic in the late 80s when I was in college! Few of my classmates bothered with it unless they HAD to use it, which in my view is what makes vi so sticky. We can thank the academic community for perpetuating it as some kind of "expert" tool and encouraging or even requiring students to use it. The same ignorance that keeps CS dogma alive such as "good programmers don't use GUI debuggers or IDEs." My college age kid in CS came home parroting this nonsense. But at this stage of her education I'm quite used to unindoctrinating. There is no reason a university should teach kids to use vi as a primary code editor. It's a crime in the context of a modern, statically typed language such as Java.
- zanellato19 6y agoBut it is an expert tool. Does that mean that a GUI editor isn't? Not at all. But I don't expect my non-programmers friends to use vi/vim (or any person, really), but its definetely something that proves its worth to programmers more than to other people. The elitist attitude is terrible, I agree, and people should use it for whatever they want, but to deny that it is an expert's tool is wrong, imo.