TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Bill Joy's greatest gift to man – the vi editor (2003)

215 pointsby spkingabout 5 years ago

28 comments

nouveauxabout 5 years ago
For those who do not understand why people are fanatical about vi, here are some reasons:<p>Vi is keyboard only. This means that actions with the mouse are optimized through the keyboard. There are &quot;hotkeys&quot; for most tasks you use with a mouse.<p>Vi has the idea of objects. Words, lines and paragraphs are objects you can operate on.<p>Vi defines a &quot;language&quot; for operating on objects. For instance, &#x27;d&#x27; is delete. You can delete a word using &#x27;dw&#x27;. You can delete 5 words with &#x27;5dw&#x27;. Another example: deleting a line is &#x27;dd&#x27;. Delete 5 lines with &#x27;5dd&#x27;<p>It is a modal editor. At a basic level there is an &quot;edit&quot; (insert) mode, a &quot;navigation&quot; (normal) mode, and a &quot;selection&quot; (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 &#x27;5w&#x27; to select five words. &#x27;d&#x27; now deletes everything in the selection. If you&#x27;ve ever struggled to manage and remember your hotkeys, modal environment is your friend. (set this up in mac using something like hammerspoon.)<p>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&#x2F;redo. &quot;.&quot; 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.<p>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 &#x27;language&#x27; to all these cli tools for more productivity.<p>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&#x27;ll be second nature in a couple of weeks.<p><a href="https:&#x2F;&#x2F;vim-adventures.com" rel="nofollow">https:&#x2F;&#x2F;vim-adventures.com</a>
评论 #23094011 未加载
评论 #23094315 未加载
评论 #23094092 未加载
评论 #23094218 未加载
评论 #23094189 未加载
评论 #23096032 未加载
评论 #23095866 未加载
评论 #23094782 未加载
评论 #23095018 未加载
评论 #23094609 未加载
评论 #23098264 未加载
评论 #23095624 未加载
steffanabout 5 years ago
Let&#x27;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.
评论 #23092944 未加载
评论 #23092532 未加载
评论 #23092552 未加载
评论 #23099846 未加载
taylodlabout 5 years ago
&quot;Among Joy&#x27;s list of achievements are BSD Unix, NFS, UltraSPARC designs and some work on Java&quot; - not to mention Berkley Sockets. But his greatest gift to man was vi? I think not!<p>Full disclosure: I&#x27;m an &quot;emacs guy&quot; but I don&#x27;t care about the silly old emacs&#x2F;vi wars. I would just say as awesome as people find vi to be, it&#x27;s among the least of Bill&#x27;s accomplishments. That&#x27;s how awesome he is!
评论 #23095016 未加载
ben7799about 5 years ago
Vi is the ultimate example of software that is &quot;easy to use&quot; as opposed to &quot;easy to learn&quot;, it is great that we still have Vi and so many other unix tools that use the same philosophy.<p>One of the biggest things that has happened to computer software in modern times is the balance between &quot;easy to use&quot; and &quot;easy to learn&quot; has shifted dramatically towards &quot;easy to learn&quot;.<p>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.<p>Before the mouse almost all software was harder to learn but users would become extremely fast &amp; 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 &amp; shortcuts for everything.<p>A lot of mobile stuff is the ultimate opposite.. it takes 2nds to learn but you&#x27;re never going to be able to use it any more efficiently or quickly than you did 5 minutes after you first tried it.
评论 #23096759 未加载
madmax108about 5 years ago
Required reading for anyone who uses Vi (or wants to take the dive)<p>&quot;Your problem with Vim is that you don&#x27;t grok vi.&quot; : <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;1220118" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;1220118</a><p>Anecdote time:<p>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.<p>&#x27;v&#x27; is vi-speak for switching to visual mode &#x27;%&#x27; is vi-speak for skip to matching param &#x27;y&#x27; is vi-speak for copy (or yank)<p>So &#x27;v%y&#x27; is for switching to visual mode and jump to matching param (which visual mode highlights text) and then copy the highlighted text.<p>Ah, the joys of vim! Truly one of those tools that can elevate your whole productivity once you grok the basics! :)
JJMcJabout 5 years ago
He also created Berkeley sockets, which pretty much powers networking today.
评论 #23095472 未加载
评论 #23094747 未加载
bradfordabout 5 years ago
My career as a software developer is indebted to vi.<p>text editing can be a thankless, soul-sucking chore without the proper tools. I&#x27;ve seen otherwise intelligent individuals abandon a software career because they never quite figured out how to efficiently do it. I wouldn&#x27;t say that vi&#x2F;vim is the only tool that can do the job, but it&#x27;s the one that I&#x27;ve chosen.<p>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.
bdammabout 5 years ago
vi 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.
评论 #23093102 未加载
coliveiraabout 5 years ago
I 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&#x27;ve never looked back since I learned this way of working.
评论 #23095648 未加载
评论 #23092797 未加载
评论 #23092979 未加载
评论 #23094281 未加载
DonHopkinsabout 5 years ago
On Nov 8, 2018, I sent Bill Joy a birthday greeting: &quot;Happy 17,179,869,184 MIPS Birthday, Bill&quot;! (2 to the (year - 1984))<p>Bill Joy’s Law: 2^(Year-1984) Million Instructions per Second<p><a href="https:&#x2F;&#x2F;medium.com&#x2F;@donhopkins&#x2F;bill-joys-law-2-year-1984-million-instructions-per-second-3a8c92165cfe" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@donhopkins&#x2F;bill-joys-law-2-year-1984-mil...</a><p>&gt;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)<p>&gt;C++++-=<p>&gt;“C++++-= is the new language that is a little more than C++ and a lot less.” -Bill Joy<p>&gt;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.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Joy%27s_law_(computing)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Joy%27s_law_(computing)</a><p>&gt;Introduction<p>&gt;These are some highlights from a prescient talk by Bill Joy in February of 1991.<p>&gt;“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
narratorabout 5 years ago
It&#x27;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?
评论 #23092318 未加载
评论 #23093020 未加载
评论 #23092826 未加载
评论 #23094802 未加载
评论 #23092448 未加载
millstoneabout 5 years ago
I 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.<p>Example is searching for text on my system clipboard. There&#x27;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.<p>(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.)<p>Anyways looking for practical suggestions for getting into vim - a &quot;cheat sheet&quot; that has actually worked for someone!
zzo38computerabout 5 years ago
I 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&#x27;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&#x27;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&#x27;t just a lot of computer software that is badly designed these days, but even user interfaces of VCRs, DVD recorders, etc. I don&#x27;t really like MSE so much, so I wrote TeXnicard. I don&#x27;t really like most NNTP software so much, so I wrote bystand. I don&#x27;t like KevEdit so much, so I wrote ZZTQED. I don&#x27;t like Inform so much, so I wrote Glasm. etc
psim1about 5 years ago
The 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&#x27;t prepared to argue but I wanted to know why. They said you&#x27;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.
mckinneyabout 5 years ago
Ok, I get that vi is a legend etc. I think I understand why, but I&#x27;ll keep that to myself. But honestly, it&#x27;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 &quot;expert&quot; tool and encouraging or even requiring students to use it. The same ignorance that keeps CS dogma alive such as &quot;good programmers don&#x27;t use GUI debuggers or IDEs.&quot; My college age kid in CS came home parroting this nonsense. But at this stage of her education I&#x27;m quite used to unindoctrinating. There is no reason a university should teach kids to use vi as a primary code editor. It&#x27;s a crime in the context of a modern, statically typed language such as Java.
评论 #23115654 未加载
asciimovabout 5 years ago
BTW it&#x27;s :x to save and exit.
评论 #23092313 未加载
评论 #23092963 未加载
koonsoloabout 5 years ago
Mandatory link for those who wonder &quot;Why, oh WHY, do those #?@! nutheads use vi?&quot;<p><a href="http:&#x2F;&#x2F;www.viemu.com&#x2F;a-why-vi-vim.html" rel="nofollow">http:&#x2F;&#x2F;www.viemu.com&#x2F;a-why-vi-vim.html</a>
CalChrisabout 5 years ago
Dating myself, but I found <i>vi</i> fairly easy to learn since I had used <i>TECO</i> on DEC machines. I rather liked <i>TECO</i>.<p><pre><code> iHello World\n&lt;escape&gt; </code></pre> is the same in <i>TECO</i> and <i>vi</i>.
cbsmithabout 5 years ago
Sad to see Bill Joy&#x27;s contributions so minimized.;-)
ulisesrmzrocheabout 5 years ago
Highly 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)<p>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<p>Downvote away
DonHopkinsabout 5 years ago
&quot;I wish we hadn&#x27;t used all the keys on the keyboard.&quot; -Bill Joy<p>Interview with Bill Joy from the August 1984 issue of Unix Review magazine:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;sysprv&#x2F;vimrc&#x2F;blob&#x2F;master&#x2F;joy84.html" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sysprv&#x2F;vimrc&#x2F;blob&#x2F;master&#x2F;joy84.html</a>
xwdvabout 5 years ago
Thank you Bill Joy, no other tool in my programming career has been as impactful as vi, and all its iterations.
downerendingabout 5 years ago
If the original vi used &#x27;jkl;&#x27; for movement and put a startup message on the screen for newbies explaining how to exit, I&#x27;d probably be using it today.<p>Turns out that was enough to send me on to glorious decades of emacs.
nevesabout 5 years ago
The Unix Hater&#x27;s Handbook is an excellent read: <a href="https:&#x2F;&#x2F;web.mit.edu&#x2F;~simsong&#x2F;www&#x2F;ugh.pdf" rel="nofollow">https:&#x2F;&#x2F;web.mit.edu&#x2F;~simsong&#x2F;www&#x2F;ugh.pdf</a>
forrestthewoodsabout 5 years ago
Yesterday 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.
评论 #23093372 未加载
sunnytimesabout 5 years ago
I used to use vi all the time and the joke always was<p>&quot;vi is a four letter word&quot;
rifficabout 5 years ago
the vi editor is a masterpiece for the ages. a true work of art.
dieseleratorabout 5 years ago
tl;dr The Register interviews Bill Joy about writing vi over a very slow data link.<p>I use vi (m) every day. Thank you, Bill Joy, and Happy Birthday whenever chron brings it up.
评论 #23092061 未加载