Live data from Hacker News

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

theregister.co.uk

51–60 of 186 posts

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

#51
post #27
post #12

Let'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.

What'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 peo…

NeoVim was started to add in a couple features that had gotten pushback from Bram when the original forker(?) (long since moved on from the project) got frustrated with getting shot down.

Basically the relationship at this point between the two projects appears to be that the NeoVim team implements some features. The ones that gain significant traction, Bram then implements in his own style.

At this point they are basically at feature parity with each other I think. The main difference between the two in my experience is that NeoVim is much more likely to integrate existing libraries, while Vim is more of a self-contained project.

One of the side effects of that is the NeoVim people like to brag how much code they've deleted from Vim. The thing they don't mention is all the deps they've added in the process.

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

#52

Earlier quoted context omitted.

> rely on thousands of lines of lisp code, like emacs does Millions actually. I'm an emacs user (who does not want to get into an editor war, mmkay). The plugins are so useful. I'm just learning magit and it very much takes most of the evil and hostility out of Git and I really like it. I also have dired (a sophisticated directory editor), and about to learn loads more such as Bookmark+ which allows links and jumps t…

That's correct, Emacs is a platform to write applications that can connect to a text editor. This is a different proposition than vi. Like other unix tools, vi goal is to concentrate on one thing (editing), and let the rest, like email reading, git operations, etc., to be handled by other UNIX tools.

I think you misunderstand. Though I've not set up email myself, I believe most email tools export their actual operations to an external tool (gnus may be an excpetion, not sure). I know for a fact that magit, the git interface, delegates directly to git. For source file tags and tag searching it delegates to an external tagger.

I don't think it does as much as you might think.

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

#53
post #27
post #12

Let'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.

What'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 peo…

>What's the story with NeoVim exactly?

> I mean what are the tangible, user-facing advantages of NeoVim over Vim?

Hard to answer really. I mean, what are the tangible, user-facing advantages of having llvm/clang over only having gcc? of libressl over openssl? Chances are you aren't targeting libclang in your code so does it really matter if it exists, from a user-facing perspective?

I recall neovim started like many projects, because some folks wanted to add stuff, clean up, change directions slightly, etc, and the current project at the time basically didn't want to do it. Consider that at some point in the past a person probably asked the same question you are asking, except about vim vs vi.

Not 100% sure but neovim added several feature first: a better cross-platform input method (libuv); asynchronous plug-ins; a terminal emulator; probably others - and some of these features have bled into vim. Essentially, pressure and feature competition from neovim has improved vim. Neovim has done a bunch of other cleanup; as far as user-facing advantages it would mostly come down to better plug-in architecture and possibly better plug-ins.

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

#54
post #37

Earlier quoted context omitted.

I aliased it so either : or ; work for : I admit I typed :wq for more than a decade before learning about :x

:wq! because I really mean it!

why not just :q! to live dangerously :)

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

#55
post #25

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've never looked back since I learned this way of working.

I'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.

Oddly enough, learning Dvorak during a [slow] summer internship and then learning to use Vim regexes to edit/search a couple TCP dumps at my first job probably are the reasons I eventually became interested in scripting/programming and eventually a software developer.

Really if it weren't for the first challenge of learning Vim, I wouldn't have learned to program. Which, I know, sounds kind of backwards :P

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

#57
On 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-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)

>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

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

#58
For 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

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

#59
post #49

Earlier quoted context omitted.

Do you remember the time when every time you wanted to copy or paste something in a word processor you would dutifully hike your mouse up to the Edit button so you could select "Copy" or "Paste", and how when you learned that CTRL+C and CTRL+V was a thing your mind was blown with how much quicker it was? Vim gives you that experience, except times a gajillion because it not only speeds up what you already do in a WYS…

> powerful new tools to edit that have no WYSIWYG equivalent Can you give an example? I have heard this but I have difficulty understanding exactly what I could do in Vim that I couldn't do in Sublime Text for example

3dw

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

#60

Earlier quoted context omitted.

My 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.

I 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 the…

vimtutor - it should already be installed on your system alongside vim
Post reply on HN