Hacker News new | ask | show | jobs
by DiabloD3 3573 days ago
Given Vim powers our industry, it'd be neat if pg or any of the other big members of our community donated a non-trivial amount.

There is very few pieces of software I could never imagine replacing in my toolkit. Linux? I use Windows, too. GCC? Clang gets some love sometimes. Languages themselves? I'm fluent in several. Shell? I used Bash for years, now I switched to ZSH, but could go back to Bash if I needed. Tmux? I could also go back to screen if I needed to.

But vim? There's no replacement for vim. vim changes how you think about programming, how you think about software development. It is this frictionless editor (I mean, yes, huge fucking learning curve, but so is programming in general) that, even 20 years later, I will never abandon (unless I'm doing Java, because... fuck Java outside of Eclipse or IntelliJ; and yes, I've tried using that one vim<->eclipse bridge, hell no).

11 comments

Just to add to this, a couple years ago I was able to run a campaign to raise $5000 for Vim via Hacker Newsletter (http://hackernewsletter.com) all thanks to 38k great subscribers and sponsors. So while not officially via HN, it was unofficially. :)

We currently hold the top spot, although I would be happy to see someone surpass that: http://www.vim.org/sponsor/hall_of_honour.php

> There's no replacement for vim.

I'm used to seeing people say "vim" where "vi" is meant (of which vim is but one (much enhanced) clone), so when you say you could switch out gcc for clang, or bash for zsh, could you not switch out vim for (e.g.) nvi[0]? If not, why not?

[0] https://en.wikipedia.org/wiki/Nvi

nvi provides a minimalist implementation of vi. If you feel comfortable with the vi keybindings in other editors, nvi will likely suffice. However, many vim users expect scriptability, programming language support, and numerous other features.

The analogous comparison would be between bash and posh/dash, or between gcc/clang and the Tiny C Compiler.

I haven't used nvi in several years (mostly because, unlike nvi, vim has become universally available on the systems I use), but it's not minimalist. nvi has a number of features that the original vi does not. Perl integration and infinite undo are two examples.
nvi definitely provides more features than the original vi, just not nearly as much as vim. And it doesn't have a comparable ecosystem of plugin/package developers around it, either.
Is there a popularity dashboard of plugins that one could check to see what features vim users are enjoying that I've been living without?
http://vimawesome.com/ has a list of Vim plugins sorted by their popularity, measured by presence in dotfiles repos on GitHub.
For a conservative list of "essential plugins", see https://www.vi-improved.org/plugins/

"surround" and "targets" are indispensable for me.

Almost nobody is using Bill Joy's vi and most systems don't have it. They might have a symlink to vim named 'vi'.
Why would you want to switch out of vim ? It runs everywhere. nvi is completely different, all the configurations and so on. Syntax files, plugins, you can't just move those over.
You're assuming a vim-centric point-of-view. Believe it or not, I don't use vim that much, and so I have no vim configuration/plugins to worry about. nvi happens to be where I spend the bulk of my time since I've cared what flavour of vi I'm using. So, I haven't "switched out of vim". I am genuinely interested in "what I'm missing" though. I occasionally trawl though youtube to look for videos, but I mostly haven't had my mind blown. I think I -would- like horizontal (or would you call it vertical?) screen splits where I have a left screen and a right screen (nvi provides splitting arranged above/below ea. other), and to fold sections of my work too, so I could (using my imagination here): ma (mark 'a), go to some other spot in the doc and: \(backslash)'a (fold the text from "here" to the 'a mark). That'd be immediately satisfying. Otherwise, I think nvi holds up really well for me.
Someone somewhere uses elvis, but it doesn't make any sense to assume an elvis-centric point of view.
I haven't used nvi in many years, but for me, vim is much more than just the vi key bindings. Absolutely core features for me include folding and the various syntax-related features (filetype identification, syntax highlighting, filetype-specific logic, etc.).
I found that Emacs + Evil is a pretty good replacement for Vim. Nowadays there is also NeoVim.
I consider NeoVim a Vim, too, thus I don't mention it separately, even though a lot of the internals has been changed around. I wish them a lot of luck.

Evil mode in Emacs seems to be a bit of a crutch. I was actually an emacs user for awhile, and a lot of emacs' power imo comes from using emacs "the right way". I respect emacs and emacs users.

There is also Spacemacs, which imho, is much better than Emacs + Evil.
Spacemacs is Emacs + Evil...
But with a fantastic boilerplate that requires minimal set up and very easy ways to configure it.
plus that annoying space button
butwherewouldwebewithoutthespacebutton?
Re: eclipse. Rather than the bridge you might want to give vrapper (http://vrapper.sourceforge.net/home/) a try. I find it to be quite acceptable - much better than having no vim keybindings. It's very comparable to the jetbrain's vim plugin.
jetbrains vim plugin doesn't even let you define your own vim like keybindings. It is the worst vim plugin I've seen.
Actually, there is some minimal support for map keybindings. See https://github.com/JetBrains/ideavim
Interesting seems to have improved.
I use both. Vrapper is the best Vim emulation so far
JetBrain's Vim plugin is very high quality.
It's the only VIM emulation mode I've used that isn't completely annoying. I'm including spacemacs in that assessment.
I agree, it's just Good Enough. I mostly miss some add-ons like surround.
Surround support was just added in IdeaVim 0.46. From the release notes:

Support for vim-surround commands ys, cs, ds, S, enable it with set surround in your ~/.ideavimrc

:-o Thanks!
It's OK but I could never get it to do things beyond basic editing like window management right.
It's high quality as they go but not close to being a vim substitute in my experience. There are still tons of little things that don't work as expected.
so is netbeans's - it's a straight port of the vim source code to java
I came into Vim pretty happy with my other tools (a very-enhanced Sublime Text 3 and JetBrains IDEs)...I wasn't trying to learn Vim, I just had to. Vim is now basically my one tool. That and tmux...and more of the stuff I was using tmux's features for I'm doing in Vim. Both tools are definitely irreplaceable for me at this point, but vim much more than the other.
> I will never abandon (unless I'm doing Java, because... fuck Java outside of Eclipse or IntelliJ; and yes, I've tried using that one vim<->eclipse bridge, hell no)

If you're referring to eclim [0] FWIW I've found it to be an adequate way to have a vim centric workflow with a few excursions into eclipse. If you have proficiency with both tools and enjoy having an eclim server running in a eclipse window you'd get have access to the best features of both tools.

[0] http://eclim.org/

I'm still trying to use vim with java =P Someday I will be happy
Vrapper (http://vrapper.sourceforge.net/home/)

Its a very non-intrusive vim plugin for Eclipse, just does vim emulation and nothing else.

I've found it to be very pleasant to work with.

I did use this plugin for a long time. The best plugin so far. I want a plugin like this for Intellij :P
https://plugins.jetbrains.com/plugin/164 (IdeaVIM) is pretty good for intellij based ides.
actually I'm using this plugin. Not the better but helps to fell good
eclim ftw
the problem with eclim is that is slow for huge projects. I did use for some time
> Given Vim powers our industry

I hope that you're being sarcastic.

Nope. The only other popular editors I've seen people using is either Sublime which, although highly configurable, just ain't no vim; or, all the emacs users, with emacs being the only real competitor to vim. I didn't mean what I said as a slight to emacs users at all, I respect them and their editor, I'm just a huge vim fan.

Also, the same with Java only being used with Java IDEs, C# only being used with Visual Studio is also a notable exception to my "vim all the things" rule.

Probably different people have different views on the industry. I never saw anyone (but me) using vim. Programming: Eclipse, Intellij Idea. Administration: notepad, sometimes notepad++. For Linux it's KEdit or GEdit, depending on environment, I saw nano once. vim or Emacs are popular among enthusiasts, but for many professionals who's just makes living on it, those are gimmicks from ancient era.

I spent quite a lot of time mastering vim. It's beautiful editor and I could be incredibly productive with it, but I'm not sure that there are many people who'll do that.

Every so often someone will do a "what editor do you use?" poll here, vim is the top choice. Maybe it's not the most common in the industry, especially if you include the hordes of Java or C# only developers, but at least among HN devs it's the #1 pick.
A stack overflow survey (http://stackoverflow.com/research/developer-survey-2016) had plenty of vim users and that includes us c#/java hordes.
Atom is reasonably popular, and Visual Studio Code is getting there.
So you see the comfort of using IDE (eclipse or intellij) with languages such as Java. Do you feel a similar comfort in vim? with which languages?
Not the parent but I have the same reaction, and I wouldn't describe my experience in big IDEs as "comfort", just less pain. I use them with Java only out of necessity, and only on huge projects I didn't have a part in designing up front.

Every other programming language I've used a lot of (spanning from assembly to lisp) I've found it most pleasant to work in vim, even in large projects. I suspect the only other environments I'd want an IDE would be for iOS development and C#.

I found Vi to work perfectly well for C#.

Visual Studio would have been better, if I could have got a decent Windows desktop to span both of my monitors. But since my employer at the time didn't want to get a Windows PC or get a Visual Studio license for this Windows desktop application project, Vim + Samba + SSH were a workable substitute.

I don't know if it's still there, but at one point (some?) MS licenses had an audit clause that would allow the BSA or MS to raid your employer at their expense. That could be one reason for a non-MS shop not to want to get any MS licenses.
Java and C# were both designed to be used in language specific IDEs (C# inheriting that from Java). Using Java outside of a Java IDE is insane.

C, C++, Python, Ruby, JS, Erlang, Perl, etc, just require a relatively sane text editor, no full scale heavy weight IDE features needed. So, yeah, vim does everything I need there.

"Vanilla" C++ is one thing, but when it comes to using comprehensive frameworks such as Qt or wxWidgets, I guess you have similar reasons (to Java and C# with their "batteries") to use IDE.
Nano
Are you seriously suggesting that nano is a valid replacement for vim?
If vim for you is "the thing you edit config files with when sshing to a server," yes, it is. As a full-fledged development environment, it's not.
In the context of this thread, it is not a valid replacement.
I was able to explain to a first time Linux user how to edit a network/interfaces file using nano. I'm not sure I could have done that with vim. That makes a difference in my book.