Live data from Hacker News

How Did Vim Become So Popular?

pragmaticpineapple.com

341–350 of 507 posts

Re: How Did Vim Become So Popular?

#341
post #222

Earlier quoted context omitted.

I’m always interested in this opinion. What IDE features do you think vim is missing that aren’t available via LSP plugins?

I tried getting vim to match my favorite features in VSCode / Jetbrains IDEs and almost went crazy. Rather simple things like code completion or syntax highlighting were already moderately complex to set up. The command palette present in both Jetbrains and VSCode also has thousands of actions easily searchable in plain language, the most simple of which can be replicated with vim (ex: open file) but many of which wo…

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 can't replicate with plugins but it's very rare to see someone actually provide an example of one.

Something like a profiler with flame graph might be an example. Things like refactoring, completion or fast command search probably aren't.

Re: How Did Vim Become So Popular?

#342

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.

(Helpful tip) map caps lock to escape: https://vim.fandom.com/wiki/Avoid_the_escape_key

Still wasteful. Map Capslock to both Escape and Ctrl and never look back

https://github.com/alols/xcape (for linux)

https://apple.stackexchange.com/questions/132564/how-can-i-r... (for macOS)

https://github.com/ililim/dual-key-remap (for windows)

Re: How Did Vim Become So Popular?

#343
post #228

Earlier quoted context omitted.

Honestly, I can do almost all of these things with any standard editor as well, with standard shortcuts. The ones I can't do directly, I can do via Search/Replace functionality that is also standard in most modern editors. Your example about refactoring a function by using text editing capabilities is actually pretty bad unless you mean Vim can actually parse your programming language and perform the refactoring over…

Here's the real question - So you are convinced you don't need Vim, right? Why are you on this thread? No one's saying vim is superior. However, you need to have an open mind to understand the alternatives. It's not like Vim is a paid product and by you not using it, Vim is going to die out soon or anything. If you dont' like it, great? You are happy with the alternative, great. You seem like you just want to deliber…

I am in this thread because this is not a thread about how Vim is great, it's a thread about how Vim became popular, which I honestly don't understand in a day and age where modes are completely unnecessary. I see lots of happy Vim users telling the rest of us how they are so happy with Vim and they can't understand how anyone can do anything without it... so I thought I should point out I feel extremely productive on any non-mode text editor (all my shortcuts work even in this HN editor, on a browser, in Word, basically anywhere except old editors like Vim). Been programming for nearly 2 decades now and even when I started, I thought Vim was a tool from a time when we didn't have Ctrl and Arrow keys and we already had better alternatives.

At this point, I feel like "I use Vim" is like "BTW I use Arch", said usually with an air of superiority as if choosing "the hard way" was somehow smart.

Re: How Did Vim Become So Popular?

#344
post #176

I've been using Vim more and more in the past few months, but I still use VS Code primarily for a lot of my work. At work, I do a lot of Node/TS stuff, so VS Code just offers a whole wealth of tools that I'm already familiar with. I'm sure I could pimp out Vim to do it just as well, if not better, but I still enjoy VS Code. Where Vim shines for me is for creating and editing small files. I use vim for my journal, qui…

VSCode is very customisable. So you can make it behave exactly like your vim (+plugins) setup behaves.

Not true. VSCode lacks some very fundamental functionality, like proper (non-linear) undo and the vim plugin basically does not support any ex commands (other than s, which works different as well). Having said that, I think the VSCode vim plugin gives a quite good experience overall.

Re: How Did Vim Become So Popular?

#345

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.

I don't use vim, but this feature seems mostly useful for deleting things within marking characters, such as " and ', which I do surprisingly often. (But not often enough to learn a shortcut to do it)

Re: How Did Vim Become So Popular?

#346
post #303

Earlier quoted context omitted.

> And since, almost nothing else (save for maybe git) beat learning vim from a return on investment perspective. Interesting. I generally use IDEs Pycharm or Eclipse, or VSCode depending on the language. Do you think I would gain a lot from learning VIM?

No. It's like when somebody wants to learn how to fly, people tell them first to learn how to run really fast.

Nowadays Vim isn't just Vim the text editor but rather a specification for text manipulation. All of the popular IDEs have Vim plugins and the benefits of learning both are perfectly additive.

Re: How Did Vim Become So Popular?

#347

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.

> How often do you really do things like this though?

All the time. Some examples:

* ct, : "change up to comma", useful for replacing a function argument.

* ya" : "yank around '"'", copy the string literal the cursor is currently inside.

* ci( : "change inside '('", useful for changing the condition in an "if" statement.

* da{ : "delete (i.e. cut) '{'-delimited block", useful when changing the structure of if/else blocks.

I agree that these commands may sound obscure, and many Vim users use the program for a long time without using them (I certainly did). But when you start using them, you find that these composable editing commands correspond really well to many of the logical editing actions you perform.

Re: How Did Vim Become So Popular?

#348
post #321

Earlier quoted context omitted.

And LSP is yet SO MUCH better

Heard good things about it, but I'm on an endeavour to learn how to do things with Vanilla Vim first to avoid abusing my use of plug ins for things Vim can handle gracefully ootb. Now you're the creator of autojump, I just want to say your software is definitely a time saver, especially with this https://github.com/fdw/ranger-autojump , keep up with the great work.

I'm with you with avoiding too many plugins. But LSP is not just another plugin, it's the standard for languages to implement IDE support. I find it hard to justify not using it if you're doing serious software development (depending on the language of course).

Thanks for the kind words on autojump :) I'm no longer involved with the project, but I feel the general idea is still relevant.

Re: How Did Vim Become So Popular?

#349
I think it's a bit sad that the article completely fails to mention that Bram Moolenaar originally implemented vim on the Amiga. Actually this might have contributed to its popularity: back in 1991, Amigas were much more widespread than Unix boxes, and around the time Commodore went bust and the Amiga was no more, i imagine lots of developers migrated to then-new Linux rather than to the despised DOS/Windows, and took their preference for vim with them.

Re: How Did Vim Become So Popular?

#350

Earlier quoted context omitted.

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…

The problem with Emacs and all its modifications is that it cannot match Vim's flexible system for custom keybindings. And because of that Evil mode has the same limitation, beside its insistence to prefer using builtin Emacs functionality over emulating Vim behaviour correctly. And the other thing that I could never get used to is that Emacs' terminals can't handle ncurses applications. I usually like to run Vim in…

> The problem with Emacs and all its modifications is that it cannot match Vim's flexible system for custom keybindings. And because of that Evil mode has the same limitation

Can you explain what limitations you mean? What keybindings has vim over emacs?

> And the other thing that I could never get used to is that Emacs' terminals can't handle ncurses applications.

libvterm seems to have solved this problem recently. Works well enough that I can use vim inside emacs.

Post reply on HN