Live data from Hacker News

How Did Vim Become So Popular?

pragmaticpineapple.com

431–440 of 507 posts

Re: How Did Vim Become So Popular?

#431

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…

Did you not read TFA? ~25% of web devs in the SO 2019 survey said they used VIM as their editor. Amongst dev-ops that number is higher, around 40%. https://insights.stackoverflow.com/survey/2019#technology-_-... So your anecdotal example of "99% of people using VS or VSCode" doesn't ring true for the industry as a whole.

FYI, the guidelines state:

> Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."

Re: How Did Vim Become So Popular?

#432

Earlier quoted context omitted.

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

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

1) vim is easier on your hands if you're on a high-latency connection (i.e. usable in a terminal) and/or get tired of chording (i.e. having to press Ctrl along with random keys).

2) I've found vim's plugin systems (Pathogen, Vundle, vim-plug) vastly more intuitive than Emacs' version with package-install and activating one of several repositories (Milk, ELPA, MELPA, whatever) - you install the same plugin regardless of whether you're using Vundle or vim-plug

3) vim and its packages are vastly easier to configure - this is subjective and may be much improved in Doom Emacs/Spacemacs, but in general vim packages have a bunch of global variables that you can set to a number or a string whereas most emacs packages need you to define elisp functions and/or nontrivial data structures, with no sane defaults to fall back on if you want things just to work

Re: How Did Vim Become So Popular?

#433

Earlier quoted context omitted.

> there are many things that are not ideal I’ve never used vim, mind sharing what it’s weaknesses are?

Code browsing and inspection is somewhat hampered by the fact its CLI. I use ctags and macros to move around code but its not always perfect. But then again there are many things I dislike in modern IDEs, I don't think there is a ideal solution, just like there is no one language to solve all problems.

[deleted]

Re: How Did Vim Become So Popular?

#434

Earlier quoted context omitted.

> vim plugin in VSCode. How is that these days? I used it a couple of years ago but it had issues at the time, namely some performance problems and getting stuck in a particular mode. I ended up abandoning vim bindings because the JetBrains plugin was also buggy, and I straight up had no feasible way to get those bindings in Xcode, but I hold out hope for a glorious LSP-based future where I can just use vim and get a…

If you haven't already, you might want to check out coc.nvim https://github.com/neoclide/coc.nvim

Coc.nvim is awesome. Instead of trying to bring the UI of vim to another editor, coc.nvim brings the "backend" of the other editor to vim.

I tried using VSCode with the Vim plugin for a while but the latency and inconsistencies eventually got me back to proper (neo)vim. UIs are almost always more complex and subtle than people intuit, have a large surface area, and make lag and inconsistencies most noticeable.

Re: How Did Vim Become So Popular?

#435

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…

I think they are just being posers. When we compare the efficiency of debugging (p. ex.) it is clear who can find the problem fast. Today if I'm conducting an interview and the someone tries to convince me he/she is a good programmer and just use vi/vim, I need to rethink my decision because it can compromise the whole project. I'm not saying they are not good, but having the capability of fast debugging and solving…

Interesting comment. I've been programming for more than 25 years. Have used stuff like GWBASIC, TurboPascal/C , fancy ide like VisualStudio, Eclipse, Netbeans and the new kids like atom or vscode. I even used DDD at some point.

Line debugging becomes less and less valuable as you become more mature in you dev career. Sometimes you have a race condition bug, some times the target architecture just doesn't provide it (devkitpro/devkitarm or embedded) and sometimes bugs that are evident in production just cannot be replicated in your debugging environment.

In my experience it is more valuable to improve skills of building mental models of the system at hand, get effective with console logging for key info and troubleshoot issues that way.

Re: How Did Vim Become So Popular?

#436
post #422
post #276

Earlier quoted context omitted.

You're going to have to explain that one because I generally switch back to command mode after every edit so I use ctrl-[ a lot. I'd be VERY interested to hear why that's wrong and what you do differently.

my reasoning was : you could have mapped caps lock to ESC but you did not. So maybe you are using CTRL too much (CTRL-V maybe?) which is not the best way to use vim.

Can't speak for everyone, but I use this[1] keyboard most of the time, and it doesn't have a Caps Lock key to remap, but instead has Control where Caps Lock normally is. So using ctrl-[ is much easier than reaching up to the escape key.

[1] https://hhkeyboard.us/pro-classic/

Re: How Did Vim Become So Popular?

#437
post #352

Earlier quoted context omitted.

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

You're absolutely right that you pay a price for using Emacs, and that not having some awesome IDE features is part of that price.

Another part is having to look for and install the third-party modules that make it actually work well (most of them are not included in Emacs because of Stallman and the FSF being ideologues).

As you say, keeping it updated and not broken is yet another part of the price.

That said, it's clear from your comment that you have not given Emacs a serious try, at least not recently.

There's no reason you have to, but you probably shouldn't complain about it so vociferously if you haven't.

Right-click menus that cover most use cases (jump to def, find references, format code, etc) are absolutely a thing with lsp-mode (which is not too hard to set up itself - install it via the built-in package installation UI, install language servers, and tell emacs to use lsp-mode in programming languages).

There are unit testing modes that kick off tests automatically on changes and let you know if everything passed (or give you a list of failures when some tests didn't). I've not used those myself so I can't speak to their quality, but they definitely exist.

Further, these tools work for a wide array of languages, with the exact same interface for all of them (and an incredibly discoverable, extensible one).

Some of us like that a lot, as well as the comfort of having all the code to reproduce our setup directly to hand. I probably have several more decades in this game, so losing my environment to an IDE company going broke or getting bought is not a pleasant thought.

Tradeoffs, for sure, but with valid arguments for both sides.

Re: How Did Vim Become So Popular?

#438

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…

I think they are just being posers. When we compare the efficiency of debugging (p. ex.) it is clear who can find the problem fast. Today if I'm conducting an interview and the someone tries to convince me he/she is a good programmer and just use vi/vim, I need to rethink my decision because it can compromise the whole project. I'm not saying they are not good, but having the capability of fast debugging and solving…

I think you should evaluate candidates based on the skill/knowledge they show in the interview and trust that if that is up to par, then they will be competent to choose the tools that work best for them.

Re: How Did Vim Become So Popular?

#439
post #224
post #217

Earlier quoted context omitted.

(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)

You may be using vim wrong. Good for you if you like it that way

Politely, I'd consider rephrasing this in the future. Not everyone springs forth into the world with a 5kloc .vimrc. Everyone is incrementally learning from someone else at their own pace.

Re: How Did Vim Become So Popular?

#440
post #341

Earlier quoted context omitted.

I'm not going to argue with your personal choice or that you should spend time configuring vim. I'll just point out that the things you've discussed are possible in Vim if you want them. E.g. live-templates (snippets) https://github.com/neoclide/coc-snippets and that if you don't want to spend the time configuring yourself projects like https://spacevim.org/ exist. Now there probably are some IDE features that vim ca…

The most important part of my point is not that I believe that they can’t be replicated, it’s that an IDE offers them with a time investment that’s nearly zero (I spend a couple hours per year fiddling with my IDE settings, tops). I’d add that I am also quite doubtful that although they may be replicated, in many cases there aren’t going to be gotchas and UX problems not present in one of the popular IDEs. I can’t re…

> I’d turn this around and ask, why would I ever switch to pure vim?

I don't think that you should.

I'm only addressing the point that vim can't be used to do IDE like tasks, which with LSP support it clearly can

...but right now you will have to configure it if that's something you want. If it's not then you're good to go with your favourite IDE already.

Post reply on HN