Live data from Hacker News

How Did Vim Become So Popular?

pragmaticpineapple.com

351–360 of 507 posts

Re: How Did Vim Become So Popular?

#351

I know I'm going against the popular opinion here, but I have never observed anyone using either Vim or Emacs to outperform a competent IDE user, especially Visual Studio or IntelliJ. I mean sure, if you think IDEs are just slow, expensive text editors with fewer keyboard shortcuts, then you'll be disappointed, but features like "navigate to any symbol by prefix", "find all usages", and "Ctrl-click to navigate to def…

Do you have links to these studies available? My experiences support your claims, but I'd be interested in getting my hands on some objective data.

It was some updated variant of this paper, which is quite dated (year 2000): https://www.researchgate.net/publication/2955345_An_Empirica...

Note some of the Java solutions were over 40 hours, and many are over 8 (one working day)

The version I saw was informal, and included F# and C#. I remember that F# was roughly twice as fast as C#.

I don't know F# but a friend of mine does, and we both solved the sample problem. He did it in under half an hour. It took me just over an hour, but I could have done it in about 45 minutes easily except that I had (embarrassingly) misread the problem statement and wasted a bit of time.

I used Visual Studio's debugger twice, and that did actually help a lot to get the problem solved quickly.

People who are really good at Vim and C remind me of someone who is really good at using a shovel. As impressive it is to watch them work, they can't compete with a backhoe.

Re: How Did Vim Become So Popular?

#352

I know I'm going against the popular opinion here, but I have never observed anyone using either Vim or Emacs to outperform a competent IDE user, especially Visual Studio or IntelliJ. I mean sure, if you think IDEs are just slow, expensive text editors with fewer keyboard shortcuts, then you'll be disappointed, but features like "navigate to any symbol by prefix", "find all usages", and "Ctrl-click to navigate to def…

> I know I'm going against the popular opinion here, but I have never observed anyone using either Vim or Emacs to outperform a competent IDE user, especially Visual Studio or IntelliJ.

> I mean sure, if you think IDEs are just slow, expensive text editors with fewer keyboard shortcuts, then you'll be disappointed, but features like "navigate to any symbol by prefix", "find all usages"

helm-projectile-ag (which I have bound to C-p s s) does this: C-p s s \bSYMBOL shows a list of all usages and enables me to navigate to any of them.

> "Ctrl-click to navigate to definition"

M-. does this in Emacs.

> Not to mention visual debuggers, not to mention remote debugging!

With SLIME I have a full remote REPL and debugger. And it runs in a GUI too …

> Visual Studio Live Share lets two people concurrently use the entire IDE at the same time, remotely

You could do this with multi-tty within Emacs, or with Screen or tmux, or with xpra. It would not be as ergonomic, I grant.

> There's just nothing like any of this in Vim or Emacs … I mean sure, if you futz around with plugins, you might be able to reproduce some small subset of these features, but then you'd have wasted more of your time tinkering with the editor than actually getting work done.

So, Emacs doesn’t have features it clearly has, but even if it does then somehow that is also bad? What is this, a game of ‘heads I win, tails you lose’?

Re: How Did Vim Become So Popular?

#353

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…

> Delete forward to next occurrence of character Z How often do you really do things like this though? It seems like, sure you can do weird obscure things quicker in Vim, but only if you happen to remember how do to the weird obscure things, and it's only useful in weird obscure situations. For 99% of tasks the built-in VSCode stuff does the job for me. Ctrl-D especially.

Very often, actually. It's something that pops up quite a lot when editing code, and you want to remove/change a chunk of text.

Re: How Did Vim Become So Popular?

#354
Because modal editing is really, really fast? And if you edit a lot of code that’s really important?

I’ve used vim for ten years. I’ve always found the extensions to vim cludgy after a while. And I’ve happily hopped on to the sublime and vs code bandwagons because of easily extensible editors and nicer UIs.

But the first thing I do with this easily extensible editors is look for the vim plugin. Modal editing is the reason people love vim and if you don’t “get it” vim seems like a contraption only a sadist would love.

Re: How Did Vim Become So Popular?

#355
post #298

Earlier quoted context omitted.

Where I work we use a lot of jetbrains IDE's and I've been a massive fan of Intellij, I absolutely love it when I can show someone something that makes their life easier. Whether it's how to implement an external program properly using all the expansions or how to use bookmarks (how people can use an IDE for years and not find that is a good question). I've always RTFM of whatever tool I'm using as the first step the…

... and Jetbrains IDEs support a plugin called IdeaVIM that provides pretty solid vi/vim emulation.

IdeaVim is the uncanny value of vim for me. It's so close to being actual vim, but every now and then it does something unexpected and it completely throws me off.

I recorded a macro to change shouldBe([true|false]) to shouldBe[True|False](). Pretty simple: qqf(ds(~$a()q

But the vim-surround plugin emulation doesn't work properly with macros, so it'd get stuck and instead of just doing n@@ , I'd have to do n@@( , i.e pass the seperator I used for the delete surround command.

It doesn't have fold toggling, so z[a|A] doesn't work. The undo behaves weird, you usually have to do it twice UNLESS you've not moved the cursor since doing the last edit.

The git integration isn't as good as vim-fugitive and I constantly find my self reaching for the mouse to do anything git related, whereas in vim I could do it all with the keyboard.

The plugin gets brought up all the time when people talk about the JetBrains tools and no one seems to mention the short comings.

Re: How Did Vim Become So Popular?

#356

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…

I've used vi for 25 years now, starting on a m68k based BSD machine. It's an adequate editor, handy in remote shell sessions and good to know how to use, but I'd MUCH rather use an IDE or a windowed editor with menus and mouse and hotkeys like Sublime. I mean real hotkeys, not emacs. At the end of the day, it takes a certain kind of mind to like vi, and if you're not of that mind, you probably never will be.

I think it depends heavily on what you're doing. My world is full of YAML/HCL/cnf files, and if I'm writing code, Go, where code is for software that runs from the command line, a daemon, or a no frills API/web service. Atom/VSCode and other IDE's were wasted on me, so I found myself gravitating back to Vim for its ease of use for those use cases. That said, vim-bootstrap did save me effort of getting a pretty solid editor out of Vim without having to think too hard about it.

Re: How Did Vim Become So Popular?

#357
Controversial comment here, but I would say Vim isn't popular at all. I would say instead, Vim advocates are incredibly vocal (a bit like Vegans and Crossfitters) and won't hesitate to talk about it at all times.

I've been engineering now since 2002 so approaching 20 years and sure, every office has one guy who's the "hardcore" Vim guy. Everyone else in the office uses Visual Studio or VSCode, Atom, Sublime, IntelliJ etc. But the "Vim guy" is the by far the loudest guy in the room when it comes to discussing his editor, tries to tell everyone else why their editor sucks, how superior Vim is, etc etc. Meanwhile all the users of VS and other editors quietly get along with their work and feel no reason to advocate for their editor like it was a religion.

At my current company it's the same. We have maybe 300 engineers. 99% of them use VS or VSCode, there's probably one or two guys using Vim and still telling everyone else they're dumb for using VS... In 50 years when things have changed completely, there will probably still be some guys using Vim telling everyone else they're wrong for using VR Coding with voice recognition (or whatever is happening in the world of coding then).

Re: How Did Vim Become So Popular?

#358
post #278

Earlier quoted context omitted.

I've been using ctrl-[ for years, but have been experimenting with jj. Now I'm not sure which one I like better! I switched back to vim+tmux (nvim) a few weeks ago from a number of years using vs-code with the vim keybindings. I'm still trying to configure my plugins so that I don't feel like I'm repeating myself too often.

I recommend mapping jk to esc in insert mode (instead of jj), so you remain on the same line if you accidentally use it in normal mode.

Note, don't do this if you're Dutch, words with 'jk', or rather 'ijk' in them are annoyingly common.

Re: How Did Vim Become So Popular?

#359

I know I'm going against the popular opinion here, but I have never observed anyone using either Vim or Emacs to outperform a competent IDE user, especially Visual Studio or IntelliJ. I mean sure, if you think IDEs are just slow, expensive text editors with fewer keyboard shortcuts, then you'll be disappointed, but features like "navigate to any symbol by prefix", "find all usages", and "Ctrl-click to navigate to def…

I think this really depends on what you work on.

> Not to mention visual debuggers, not to mention remote debugging! The VS IntelliTrace feature alone is worth the cost of the entire IDE.

I use gdb and pudb, which are both CLI based, and have done so for years

> Visual Studio Live Share lets two people concurrently use the entire IDE at the same time, remotely: https://visualstudio.microsoft.com/services/live-share/

Tmux has let me do this for over 10 years

There are things I do not do in vim, but they are few. For example, I've developed a few Android applications as a side project and I used netbeans for it. For rust, go, c, python, I've always used vim.

Re: How Did Vim Become So Popular?

#360
post #352

I know I'm going against the popular opinion here, but I have never observed anyone using either Vim or Emacs to outperform a competent IDE user, especially Visual Studio or IntelliJ. I mean sure, if you think IDEs are just slow, expensive text editors with fewer keyboard shortcuts, then you'll be disappointed, but features like "navigate to any symbol by prefix", "find all usages", and "Ctrl-click to navigate to def…

> I know I'm going against the popular opinion here, but I have never observed anyone using either Vim or Emacs to outperform a competent IDE user, especially Visual Studio or IntelliJ. > I mean sure, if you think IDEs are just slow, expensive text editors with fewer keyboard shortcuts, then you'll be disappointed, but features like "navigate to any symbol by prefix", "find all usages" helm-projectile-ag (which I hav…

Emacs looks like shit though, requires tons of time requiring to set it up and it still won't have the same insane functionality that Visual Studio does. Are you really trying to compare the two things? If you are then I would suggest it's because you haven't tried VS recently and realized the huge functionality it has...

I mean, does Emacs have a whole UI for handling unit tests which can be made to run automatically anytime code is changed? Does Emacs have contextual right click menus for almost any eventuality? Does Emacs have a visual browser for your code? Can you debug graphics pipelines (with previews of the output images) in Emacs? Does Emacs have built in code performance analysis tools? etc etc etc etc I could go on for ages here.

You try and compare Live Share with multi-tty? What a joke! Have you seen LiveShare and what it actually offers? Easy to use, amazing UI, you can see where the other person is clicking etc etc. The reason people use these tools is because they accessible, easy to use, and "just work."

This is the opposite of Emacs. Yes you can add "some" extra functionality by Frankensteining Emacs but it is about 1% of Visual Studio out of the box and convincing any of your co-workers to go through the pain of trying to emulate VS in Emacs is a fantasy, and then having to keep it updated and not broken... hahaha.

Post reply on HN