Live data from Hacker News

How Did Vim Become So Popular?

pragmaticpineapple.com

191–200 of 507 posts

Re: How Did Vim Become So Popular?

#191

Disappointed the article went straight from punch cards to video terminals without mentioning teletypes. > Having that thing show up on computers in those days was pretty tricky, and some considered it a resource hog. Well in the 60's and 70's, you didn't necessarily even have a display, you might be using a physical teletype. `ed` is built for that. Even when you had a display, it could be slow. The VT05 from 1970,…

> ed

Ed is the standard text editor!

[0]: https://www.gnu.org/fun/jokes/ed-msg.en.html

Re: How Did Vim Become So Popular?

#192

Speaking personally, I've been a professional developer for almost decade and even in my relatively short career I've seen a lot of technologies come and go. I was reluctantly roped into it by my first boss, an enthusiastic Vim advocate. And since, almost nothing else (save for maybe git) beat learning vim from a return on investment perspective. From the default mac OS installation to some old Fedora box that has no…

Same experience here. Before learning vim I never expected its interface to make such a difference (it seemed daunting and unergonomic). I think the only other software that has made me feel that way is i3.

Re: How Did Vim Become So Popular?

#194

Does anyone have a good video comparing vim speed coding vs vscode using built in editor features? I’ve been using vscode for years and the YouTube videos that demo vim features are shallow (like how to enter a blank line - really?). I can do the same thing I have seen in vim videos without memorizing a bunch of strange key bindings all while being able to edit code instantly without changing modes. I would love to s…

There's too many little things to mention, they do all add up to be quite significant in the course of programming. Here's a tiny sample of some stuff I use constantly: Move cursor forward word at a time: w ignoring punctuation: W reverse: b B Move cursor to next occurrence of character Z: fZ reverse: FZ Delete forward to next occurrence of character Z: dfZ reverse: dFZ Change forward to next occurrence of character…

Thanks for the feedback.

vscode has regex find replace, but I don’t use it very often. It does show every match highlighted in the current file while entering the find value, which is nice.

It does the same for multi files if needed and gives a nice preview of every change.

Word navigation I use a great deal (especially with multi-cursor editing). Ctrl+left/right jumps words, home, end to begin end of line.

Ctrl+f Z Enter would go to next Z value. (Which I don’t use, because I don’t think in partial words much, but rather jump to mouse if I need to navigate far)

That’s probably where I could gain in using that instead of going to the mouse every time.

Re: How Did Vim Become So Popular?

#195

Earlier quoted context omitted.

Alas, the emacs install base is fraction of vi/vim.

I love emacs, but I taught myself to use vi because I know when I ssh into a remote server there will have a vi.

Even if it's a Cisco router and there are no text files other than a note.txt 'Here be dragons'

Re: How Did Vim Become So Popular?

#196

Speaking personally, I've been a professional developer for almost decade and even in my relatively short career I've seen a lot of technologies come and go. I was reluctantly roped into it by my first boss, an enthusiastic Vim advocate. And since, almost nothing else (save for maybe git) beat learning vim from a return on investment perspective. From the default mac OS installation to some old Fedora box that has no…

100% concur with this. I learnt Vim many years ago and I genuinely don't know what I'd do without it. It's always just there when I ssh into a new server. And the JetBrains suite has an awesome vim mode meaning I can use most (but not all) vim shortcuts with an actual IDE. I don't think vim itself works well as an IDE substitute, and wouldn't use it for hardcore web dev for example - but for quickly editing random fi…

>>I don't think vim itself works well as an IDE substitute, and wouldn't use it for hardcore web dev for example - but for quickly editing random files there's nothing that comes close.

Exactly my thoughts, you need vim and emacs these days if you want to munge through large amounts of text. The thing is in these days of Kibana and Elastic search. You don't do much of this kind of work anymore.

Code is text. But it's not that kind of text where you need your fingers and macros to do much work. Your tool needs to be at least to some extent aware and intelligent of code you are working with, or you end up doing too much work for nothing. If your language doesn't have this kind of tooling and you wish to maintain your application for long, you need to use a better commonly used language.

Much of the vim macro work I could put to use is done by black these days. If you are writing too much repeated code, you need to learn to write reusable code. Navigation is one more of those things which could improve if you use intellisense.

Bulk of modern day dev work requires working with 2 - 3 tech stacks. The use case for vim, which is writing few key stroke in one attempt to transmit them over super slow internet connections, doesn't exist anymore.

Re: How Did Vim Become So Popular?

#197

Speaking personally, I've been a professional developer for almost decade and even in my relatively short career I've seen a lot of technologies come and go. I was reluctantly roped into it by my first boss, an enthusiastic Vim advocate. And since, almost nothing else (save for maybe git) beat learning vim from a return on investment perspective. From the default mac OS installation to some old Fedora box that has no…

> And since, almost nothing else (save for maybe git) beat learning vim from a return on investment perspective

Same here. Love high ROI tools where the rug doesn't get pulled from underneath me ever year or two. Linux console tools, bash, vim, etc. My vim config dates back 20+ years, with only small modifications. I can log in into just about any *nix machine made in the last 30 years and be able to edit text at least somewhat comfortably. It takes me 30 seconds to set up a fresh Linux machine to my liking: clone a repo and run a script to symlink things to the right places in home dir. Done. I can also comfortably work from anywhere in the world over a crappy SSH connection.

C++ is the same. Glacial pace of change, skills from 20 years ago are still good with minimal modifications. 20 years from now it'll still be in use and it'll still be about the same. Which is exactly how I like it.

Another good thing about these gnarly old tools is that they weed out the dumb and impatient. I strongly suspect Rust is the same way - the learning curve and feature set look formidable. Lesser engineers are unlikely to ever learn it to the extent required to enjoy working in it. There's value in that, so I might learn it as well once they stop screwing with the core libs. I have work to do, I have no patience for such things.

Re: How Did Vim Become So Popular?

#198

Earlier quoted context omitted.

Alas, the emacs install base is fraction of vi/vim.

I love emacs, but I taught myself to use vi because I know when I ssh into a remote server there will have a vi.

Emacs has an edit-over-ssh mode that's pretty useful.

Re: How Did Vim Become So Popular?

#199

Ever year or so I look at the nice sugar that things like VScode or other IDEs have and think "it has vim mode, those nice things would be good to have" - autocomplete, things like that. So I try the IDE and I get so tired of _in the way_ it gets that I just go back to vanilla Vim. Then I think "maybe I'll try these IDE like plugins for Vim" and get so frustrated by the Vim plugin system that its back to vanilla Vim…

I was wondering what language do you code in? I am a proficient Vim user but the more I use VScode for writing Python code, the harder it gets for me to justify using Vim for serious development.

If you use the right plugins + lsp, there's nothing you can do in vscode that you can't do in vim. Just requires a lot more upfront work, but you can check the config into a git repo.

Re: How Did Vim Become So Popular?

#200

Earlier quoted context omitted.

There's too many little things to mention, they do all add up to be quite significant in the course of programming. Here's a tiny sample of some stuff I use constantly: Move cursor forward word at a time: w ignoring punctuation: W reverse: b B Move cursor to next occurrence of character Z: fZ reverse: FZ Delete forward to next occurrence of character Z: dfZ reverse: dFZ Change forward to next occurrence of character…

Thanks for the feedback. vscode has regex find replace, but I don’t use it very often. It does show every match highlighted in the current file while entering the find value, which is nice. It does the same for multi files if needed and gives a nice preview of every change. Word navigation I use a great deal (especially with multi-cursor editing). Ctrl+left/right jumps words, home, end to begin end of line. Ctrl+f Z…

Ctrl+arrow is almost as bad as going to the mouse. The thing with vim is you rarely have to leave the home row.

Some other random things I use constantly (I am not the person you're replying to):

C — replace to the end of the line

xp — swap two characters (which I have to use more frequently than I'm willing to admit.)

ci( — replace everything in brackets (like the arguments of a function, this also works with " or ' for strings, { for blocks of code, and so on). The cursor doesn't have to be inside the brackets, it'll jump to the nearest match.

:earlier 10m — time traveling, which comes in handy between commits or with config files, especially if you configure vim to write persistent change history. What did this file look like a month ago? Oh yeah, :earlier 30d

. — repeat the previous command (this is much bigger than it sounds, as it allows you to repeat the same complex manipulation on different data in situations where you can't use multi-cursor, but which don't warrant building a whole macro.)

A ton of custom filetype- and mode-dependent -based bindings (which is the spacebar in my case). space-space to jump to definition, space-f to reformat the file, that sort of stuff. This can probably be done in vscode.

If you're really interested, there are tons of vim videos on youtube made by real vim pros. I am very far from being one. The best for me are live coding sessions where vim usage is demonstrated by doing the real work, not on some toy examples.

Post reply on HN