Live data from Hacker News

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

theregister.co.uk

121–130 of 186 posts

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

#121
post #111

Earlier quoted context omitted.

> I used vi and vim for about 25 years before switching to Emacs. Then maybe you can help:) I've tried, multiple times, to switch to emacs. And every time, I get stuck, because vim keybindings are so wired in to my muscle memory now, and even the broader interactions are hard to adopt (i.e., I expect to get a command prompt by escaping to command mode and then typing ":", and then all commands are available). Is ther…

Try something like spacemacs[1] maybe and use it only for one specific task like org-mode[2]. That way, vim is still your daily driver, but you get to play with lisp/emacs on something very cool like org-mode! Then, you can slowly try to switch one thing at a time, for example start editing all Dockerfiles in spacemacs, or maybe do that one hello-world project/app in clojure/phoenix using spacemacs. See how you like…

Oh, that's a good idea:) And org-mode is compelling enough to entice me in... Thanks, I think I'll try that:)

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

#122

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 de…

Many of those features are Vim features and not Vi correct?

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

#123
post #71

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 de…

I've always thought that doing 5dd and such was a bad demonstration of Vi(m) since I never know how many lines to delete. I'll just dd multiple times. More powerful vim commands are like daw (delete all of a paragraph), di) (delete inside of a set of parentheses), and dtX (delete until the character X).

Also to add to this, dt/pattern_string_here is really handy for deleting until the occurrence of some pattern.

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

#124

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.

Emacs user here. Emacs' real value is not really in text editing, though it is no slouch in text editing. It does so many other things so well, at this point it is unthinkable for me to not have it.

Eg. OrgMode, Magit, Helm, Tramp, Dired and slime to mention a few. Its a lifestyle ;-)

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

#125
post #119
post #4

He also created Berkeley sockets, which pretty much powers networking today.

I 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

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

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

#126
Required 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

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! :)

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

#127

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 de…

>> Vi defines a "language" for operating on objects.

And the objects are text-centric (word, sentence, etc). Add on top of that a powerful macro system, and you get a really powerful tool for text manipulation.

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

#128

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 de…

I've been coding for a bit more than two years, then I decided to finally learn vim. I honestly don't know how I did before, it's just so satisfying! It's not even as hard as they say. +1 for vim adventure, definitely great learning ressources!

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

#129
post #71

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 de…

I've always thought that doing 5dd and such was a bad demonstration of Vi(m) since I never know how many lines to delete. I'll just dd multiple times. More powerful vim commands are like daw (delete all of a paragraph), di) (delete inside of a set of parentheses), and dtX (delete until the character X).

I prefer Vim's visual mode (Shift+V) for that.

But yes, `dap` and friends are options too.

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

#130

Earlier quoted context omitted.

I used vi and vim for about 25 years before switching to Emacs. I did this because: 1 - I got deeply interested in Lisp and Scheme, and Emacs was reputed to have the best editing environment for these languages 2 - Almost all of Emacs itself and Emacs' entire package ecosystem is written in eLisp, which is a tremendous improvement over vimscript, in which almost all vim packages are written. I'd just rather read and…

>4) Emacs had packages that would emulate vim It's terribly inefficient for emacs vi emulation mode to actually quit emacs when you type ":q", because it takes much longer for emacs to start up than vi, and people use a long-running emacs a lot differently than they use disposable vi's. UniPress Emacs's vi emulation mode would actually flip you over to an emacs shell buffer when you typed :q, and the shell would reco…

    alias vi='emacsclient -t -a ""'
Then whenever you run 'vi' it will create a new frame on an Emacs instance that's running as a server[1]. If there's not an Emacs server already running, then it will start one for you, so the first invocation will be slow, but every subsequent invocation will be fast. No need to change your muscle memory for this particular case.

[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Em...

Post reply on HN