Live data from Hacker News

How Did Vim Become So Popular?

pragmaticpineapple.com

211–220 of 507 posts

Re: How Did Vim Become So Popular?

#211
I started using vi in 1986, switched to vim and (mainly) emacs in the 90s. My setup now is emacs for local editing, vim for sudo vi system.config.files and when I ssh to a server.

Actually vim had a larger share of users back then because there were not many other editors for UNIX and Linux. There are probably more vim users now but even on Linux I see many more people using VS Code. The problem they have is editing files when they ssh into a server. I usually suggest nano. Not many of them notice and understand the two lines menu at the bottom of the screen.

Re: How Did Vim Become So Popular?

#212
post #89

Earlier quoted context omitted.

Hated Vi at first. Absolutely loathed it. I was all about emacs. But I gave vi another shot, and I'm so glad I did. The learning curve can be steep, and it's really unintuitive at first (or it was for me). But once it clicks a little bit, and you settle in.. Wow. I felt way more productive using it than any other editor.

I've been using vim for ~8 years now as my editor at work. I don't even use the "fancy" movements that everyone always brags about. It's still way more convenient to move around in than any other editor I've used. I don't know where I saw it, but the idea that "Code exists to be read" really resonates with me. I don't care how fast I can crank out code. I care about how efficiently I can hop around from place to plac…

>The killer feature of vim that I feel like very few people know about is it's remote editor feature.

Now this is dope, I used to rely on a trick I discovered in a conference[0], append to the `path` variable in your .vimrc so you can recursively fuzzy find files in the directory where you opened Vim, and more recently setting global marks[1] in the files of interest.

0: https://youtube.com/watch?v=XA2WjJbmmoM

1: https://vim.fandom.com/wiki/Using_marks

Re: How Did Vim Become So Popular?

#213

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…

Definitely, even now as I use emacs, I'm a 100% evil. It's just so natural (once you get it), that I don't know how other bindings (like ctrl-[whatever]) are prevalent in most other software, it's not like they are more memorable or intuitive. Fun story: I was into Free/Libre software as a teen, when I learnt how to move around in vi(m) and in my first tech gig (as a sysadmin), I was interviewed by some greybeard who…

Heh, I would fall for that!

Re: How Did Vim Become So Popular?

#214

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…

Here's a video of some more advanced vim features I threw together. I'd be surprised if you can do this using e.g. vanilla vscode

https://www.youtube.com/watch?v=UDGG3hK4Bg8

Its a simplified version of a problem from work a while ago where we had to generate ui from lots of csv files. The last dev on it was taking weeks, but with vim I was able to come in and finish the boilerplate instantly. (We were commited to non-dynamic ui at that point, I think I made the right play especially with how we ended up using it).

Vim is, in my opinion, inferior to an ide or a good text editor, but if you have it as a plugin you get the best of both worlds and vim suddenly can do... basically anything you can think of. Like here's putting a breakpoint on every line in a file

https://imgur.com/SFhlEr7

The best part of vim in an ide is when you're pair programming and you do something fancy, and your friend says "Wait, go back, howd you do that??"

Re: How Did Vim Become So Popular?

#215

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…

If one wants to do web dev on vim I strongly recommend neovim setup with coc.nvim. I know some people strongly disagree with transforming vim into and IDE, but this is a really productive setup for creating code (works like a charm for my current React project)

Personally I’ll sometimes use VSCode to browse big files or explore the codebase, but when it comes to editing them neovim with coc, fzf and a language pack is all you need.

Re: How Did Vim Become So Popular?

#216

Earlier quoted context omitted.

Same here, and then i discovered EVIL, the vi layer for emacs. The best of all worlds: Vim text manipulation grammar over the emacs engine.

I've used Emacs for many years, and recently switched to Spacemacs, a set of configs that kind of takes over Emacs and puts a great platform on top of it. I frequently describe Spacemacs as a better vim than vim. Don't get me wrong, I've used vim for ages; I'll never stop editing server config with vi, nor will I stop getting mad when vi is actually vi and not vim. But for a day to day code editor? Spacemacs is aston…

Wait until you find out about Doom, which I consider to be all the good of Spacemacs without the crust.

Re: How Did Vim Become So Popular?

#217

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…

Definitely, even now as I use emacs, I'm a 100% evil. It's just so natural (once you get it), that I don't know how other bindings (like ctrl-[whatever]) are prevalent in most other software, it's not like they are more memorable or intuitive. Fun story: I was into Free/Libre software as a teen, when I learnt how to move around in vi(m) and in my first tech gig (as a sysadmin), I was interviewed by some greybeard who…

(Funnily enough ctrl-[ is one of my most used shortcuts in vim. It’s a convenient alternative to escape if you map caps-lock to ctrl)

Re: How Did Vim Become So Popular?

#218

Earlier quoted context omitted.

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

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

Another trick to my bag, that's why I absolutely love these threads about Vim.

Re: How Did Vim Become So Popular?

#219

Earlier quoted context omitted.

I've always assumed the opposite with how people say emacs is a nice OS and poor editor... What does Vim over emacs?

I love Emacs and have been using it for years but whenever I want to make a really quick edit, i.e. writing a git commit I almost always reach for vi because by the time Emacs loaded I would've been done committing with vi, at least with a slower machine. I know some people run Emacs in daemon mode, but it's not always convenient to do that This and when I ssh into any machine, I know there will be a vi at the very l…

> This and when I ssh into any machine, I know there will be a vi at the very least

You could use emacs for that. Editing over ssh using TRAMP works perfectly in every case I've used it.

Post reply on HN