Live data from Hacker News

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

theregister.co.uk

61–70 of 186 posts

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

#61
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

Does Sublime support macros? Macros are particularly useful when fixing up semi structured text (like converting a CSV into SQL)

Even then, macros kind of have to be keyboard based, as the keyboard presents a straight forward serialization format. Similar to how macros in non-Lisp languages struggle to achieve an elegance you can't quite capture unless your language is literally a textual AST

But there's also the random things because there's so much. Like ~ to swap case, or Ctrl-A/O for increment/decrement. I find myself in non-vim editors typing "dd" all too often

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

#62
post #34
post #30

Earlier quoted context omitted.

Using it 12/7 was enough for me for me to be become proficient. ;)

If it takes 84 hours a week of use in order to become proficient I think I'll pass.

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

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

#63
post #31

It'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?

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

vi was written long before any video game ever, and the arrow keys on the ADM-3A terminal that Bill Joy used in 1976 were actually on the hjkl keys, so it made sense at the time.

https://catonmat.net/why-vim-uses-hjkl-as-arrow-keys

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

#64

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

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

#66

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…

I think it’s hard to get EDITOR working with spaces in the path.

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

#67

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 have switched to doing most of my work on IDEs like IntelliJ, VSCode, etc and the first plugin I always install is vim keybindings. It makes editing and navigating much better.

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

#69

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’d also add https://www.vimgolf.com/ as very powerful way to improve vim skills.

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

#70
post #63
post #31

Earlier quoted context omitted.

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

vi was written long before any video game ever, and the arrow keys on the ADM-3A terminal that Bill Joy used in 1976 were actually on the hjkl keys, so it made sense at the time. https://catonmat.net/why-vim-uses-hjkl-as-arrow-keys

Interesting! I can imagine it would be quite a bit more intuitive with the arrows written there. It almost makes it seem like the touted benefit of having these keys on the home row is essentially ad-hoc reasoning, and maybe this 35-year-old design decision should be re-visited since even keyboard manufacturers realized this was not the best system decades ago.
Post reply on HN