Live data from Hacker News

How Did Vim Become So Popular?

pragmaticpineapple.com

451–460 of 507 posts

Re: How Did Vim Become So Popular?

#451
post #448

Earlier quoted context omitted.

There are things like refactoring which technically are supported by vim extensions, but are just utterly inferior to the dedicated IDEs. For example - you know "extract method" refactoring. Pretty basic thing and I assume vim can do that. But on top of that when you extract the method, Intellij will go through rest of your code and try to figure out if some other parts could be automatically refactored to use this n…

That sounds very useful and it's not something that vim gives you out of the box but I'm not sure that anything you're describing is not possible via LSP plugins and extensions. Running a server to automatically search for duplicate code sounds exactly like the kind of task that LSP can handle. Since VSCode has tools for deep flow analysis (although I can't say how they compare to Intellij) then I'm pretty sure I can…

All of that is of course theoretically possible with LSP or other vim extensions. It's just that nobody did it.

Another thing is the level of integration. There are many tools which offer static analysis, duplicate detection etc. But it's completely different level of usability when you see this info immediately as you type.

Re: How Did Vim Become So Popular?

#452

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…

Being at a company where most people do not use Vim definitely has caused a great deal of consternation and discussion about why I use Vim, and why I don't use a "real" IDE.

It becomes a hot topic of discussion without my wanting or really worrying about what other people are using.

I think the comparison to Veganism is a good one--- people think it's a flex, when in reality I just like it and it helps me get my work done.

Re: How Did Vim Become So Popular?

#453
post #448

Earlier quoted context omitted.

That sounds very useful and it's not something that vim gives you out of the box but I'm not sure that anything you're describing is not possible via LSP plugins and extensions. Running a server to automatically search for duplicate code sounds exactly like the kind of task that LSP can handle. Since VSCode has tools for deep flow analysis (although I can't say how they compare to Intellij) then I'm pretty sure I can…

All of that is of course theoretically possible with LSP or other vim extensions. It's just that nobody did it. Another thing is the level of integration. There are many tools which offer static analysis, duplicate detection etc. But it's completely different level of usability when you see this info immediately as you type.

People already use LSP in vim/neovim. Realtime feedback as you type is a thing in vim.

Here is an example for typescript users.

https://thoughtbot.com/blog/modern-typescript-and-react-deve...

Again this does require you to configure things and that may not be what you want to spend your time doing but it's perfectly possible.

Also I'll add that I'm not arguing that vim is better than any other particular IDE or editor, just that IDE like features can easily be added.

Re: How Did Vim Become So Popular?

#454

Earlier quoted context omitted.

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.

> Code browsing and inspection is somewhat hampered by the fact its CLI. That's interesting because code browsing and inspection are by far the most important reason why I use a modern IDE. I tolerate all their weaknesses (slow, high memory consumption, errors after updates, etc.) because of this. I am surprised that somebody would say "I am using editor XYZ despite its weaknesses in code browsing and inspection".

This is true for me too, I would often use Vim to basically do quick modifications, and use an IDE for refactoring/completion, and code navigation.

Recently a lot of quality plugins have been made leveraging Microsoft's languageserver capabilities to provide many of these features for NeoVim/Vim:

https://github.com/neoclide/coc.nvim

In many cases it's better than an IDE because the code-inspection, linting, etc etc, can be done using the same exact tools as what your CI is using behind the scenes.

Also, having a languageserver for Rust/C++/JavaScript/TypeScript/Bash etc etc, all configured through coc avoids a lot of the jumping between IDEs/editors/tools to get reasonable completion and code navigation between each.

Re: How Did Vim Become So Popular?

#455

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 think this is the truth for me.

I have learned hundreds of tools and IDEs over the years, and nearly every one is defunct and not used any more.

Every minute I've invested in learning vim has remained relevant and useful.

Re: How Did Vim Become So Popular?

#456

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…

Almost every editor allows you to interact with it as though it's Vim. But most editors don't allow you to interact with them as though they're any other editor. I think that's a point in Vim's favor? (I certainly don't use Vim for most of my coding. It's not good enough. But I do use Vi keybindings in VSCode, Visual Studio and PhpStorm depending on what language I'm using. I'm not particular enamored of VSCode eithe…

As a data point, Mac OS native text controls have a handful of Emacs-style text commands that use Control -- like ^t, ^e, ^h, ^b, ... -- baked in.

Re: How Did Vim Become So Popular?

#458

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…

Well, I am the only guy on my team who uses VScode-Vim and I don't preach. I understand that editor is a personal choice when it comes to development.

Re: How Did Vim Become So Popular?

#459
post #441
post #372

Earlier quoted context omitted.

I guess I, and maybe other non-vim users, just don't see much use in the composability. From many examples I've seen in this thread, the only one I found truly interesting was the branching undo feature. For most features, the advantage seems very small, as the use-case is so rare, or it's not the limiting factor anyways. But this is very limited to my experience. I am pretty sure, if I already knew those things, I w…

I use the vim plugin inside of VSCode and it's perfect for me. I would never go back to just VIM, or just an IDE. but my best use case for vim modes is stuff like: [c]hange [i]nside ["], where wherever your cursor inside inside of a "string", you can just press ci" and can immediately start typing a new string to fill it. And then this same thing can be changed to ci{ to change everything in {} to change a function,…

Actually I never wondered if there were shortcuts for those, so your response prompted me to check the keymap of m PyCharm. There definetly are many extended ones, but doesn't seem to cover all of that and are not as composeable.

> But know that I've learned it, i genuinely don't think about it, and every time I'm not in VIM and have to move my mouse and click on a character I feel like I lose my train of thought of where I was in the code

I believe that, so please believe me when I tell you that I just have navigation with the mouse and other shortcuts internalised for many things. I'm not really actively thinking about it either.

Thanks for taking the time to share your thoughts!

Re: How Did Vim Become So Popular?

#460

Earlier quoted context omitted.

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

I get the impression you're using a study comparing programming languages to back up a claim comparing text editors?
Post reply on HN