Hacker News new | ask | show | jobs
by greggman3 2049 days ago
I am curious if any vim user has ever been able to see the benefits of other environments. I know I have never been able to see the benefits of vim. Part of me wants to give a try for 3-6 months just to prove to myself that it's all bullshit and that vim is just another editor.

In any case. For a long time I was a fan of my editor of choice, slickedit. It definitely has a few features I use for which I don't know the analogs in most other editors. Features like versions backups. Undo of multi-file search and replace.

Also once had someone show me IntelliJ for C++ and was fairly impressed with its refactoring features. Enough that I thought I should look more into it.

I have yet to see a feature for vim that makes it clear win over any other major editor. I have read articles that make me understand why others might like it but seriously. I think you're all deluding yourselves.

Just as an example, lately I mostly do JavaScript and a little typescript. I'm 100% sure that the VSCode experience there out of the box is superior to vim for the same purpose. VSCode is node aware, browser aware, npm aware, eslint aware, typescript aware out of the box. I have no idea how much configuration I'd have to do in vim to get it to match and I find all of that invaluable. I'm not saying vim can't do it but I am saying if I tried to start using vim today on the projects I'm working on the experience would be seriously inferior. I don't know what language I'd have to be using to change that.

6 comments

I'll bite; I'm real good w/ Vim.

My thesis, which is a borderline polemic, is that if Vim doesn't suit your needs you are doing it wrong. If your program/language/environment needs a smart editor, you've built or chosen a program/language/environment that is too complex, and an IDE won't ever solve that fundamental problem. I get we don't always get to choose these things (wh o hasn't had to learn React, Typescript, or the general JavaScript ecosystem) but my cultural stance is the people who made those things should have used Vim, realized it was hard to manage w/ Vim, and questioned their priors.

That might sound nuts or the ravings of someone who's completely drank the kool-aid; who got good at one difficult thing and now like, jams it in everywhere to ladder pull or whatever. And so I should say that I'm super amazed by the capabilities of IDEs like PyCharm or even Eclipse (or, honestly, even Code::Blocks). The sheer engineering effort alone is awesome, but some of the stuff you can do with them is incredible. I can't imagine developing the source code of Eclipse with Vim. But does using an IDE to develop Eclipse make Eclipse great, or does it simply make Eclipse _possible_?

I contend Eclipse shouldn't exist, at least not in its current form. It's too complex for humans, and its design necessitated so many engineering hours it was a net loss for humanity. If the complexity of your program/language/environment rises to the level you need an IDE to manage it, the only thing to do is start over.

Just to reassure you, you are not alone and I share this feeling exactly. It would worry me considerably if I could not use a generic text editor to work on some project. I would feel that the battle against accidental complexity was lost right from the start.

Fortunately, it never occurred, even when complex Java or Javascript frameworks were involved and coworkers thought specialized IDE were mandatory.

hmmm, if I apply that logic in other places it doesn't seem to work.

* if you can't cook with just a knife then it your food should be redesigned to need only a knife.

* if you can't film in with a camera then you should rewrite your movie (no CG).

* if you can't send it by paper then it should be re-written (no animation, no interactive diagrams, no apps)

To put it another way, I'd much rather use Final Cut Pro or Davinci Resolve to edit a video than FFMpeg. If someone became an expert in editing snippets into movies with ffmpeg from the command line and then told me that writing movies that require lots of editing is just bad writing and that it would be better if I wrote my movies so they required as little editing as possible I'd look at them funny.

Isn't it possible building up the system is a force multiplier in the same way that all the examples above the false restrictions prevent lots of progress?

It's not about force multipliers in general. It's about looking at what force multipliers incentivize/deincentivize and amplify/muffle.

With your examples, I would say something like:

OK I once only had a knife, but now I've invented an egg beater. This will allow me to do some things a lot more easily like:

- Bake cakes

- Eat soup

This will also mean I cut myself a lot less when I do decide to do something like eat soup.

So we're gonna have more cakes/soup in the world. Good? Great, egg beater stays. Bad? Woof, burying this thing in the yard. But wait I hate cutting myself. OK I'll figure out some other way to keep myself from gorging on cakes, or I guess be content with that.

So, broadly it's about thinking systemically--how the design of our tools affects how and what we build. Because it definitely has an effect. If it's easier to use a nailer than a screw gun, guess what, you're nailing more stuff. If it's easier to write a PRECONDITION clause in a function definition than a unit test, guess what you're writing a PRECONDITION clause.

You should read about the language server protocol. As it continues to become the standard vim will match most IDE-specific features while keeping all the benefits of using vim, which if you can't see I won't bother listing here. I'm already working on java 100% from vim and I don't miss a thing from intellij
Would you mind elaborating a bit on that for those of us not in the loop, like myself? Which plugins are you using?
Not the OP, but the plugins you want to look up are ALE and coc.

I've used ALE for a while and love it, but coc is the new kid on the block that often shows up in discussions of LSP.

ALE is very tunable, so it's good for us performance-nuts who don't want anything slowing down their editor without their permission.

coc takes a more batteries-included approach, and will allow you to hit the ground running / see the light sooner.

From my perspective there are two sticky elements to vim, where once you’re accustomed to exploiting them, you find it very difficult to leave.

The first (chronologically speaking, for most people) is modal editing. Most popular editors today support vim bindings. So this bulwark is gradually eroding.

The second is the automation. Any piece of your workflow can be captured and remapped to a couple keystrokes.

Some other editor might innovate a new feature that vanilla vim doesn’t have (in fact this occurs regularly).

The (not unique in idea, but in implementation) power of vim is not any superficial feature, it’s the meta feature of extensibility, and how this is interwoven with the modal editor idea.

I think many people who come to vim and then leave it for another editor get the first idea, but never got used to the second idea, or never got around to integrating the two.

> Any piece of your workflow can be captured and remapped to a couple keystrokes

How is different than recordable macros in 90% of the other editors out there? (vs programmable macros).

Can you give me an example you use regularly

Sure! One example is vim-dispatch, which provides a convenient interface for executing arbitrary shell commands asynchronously.

It works wonderfully with make, so you can run “make $file” in a couple strokes. I use this when writing markdown (to generate html with pandoc), editing test files, etc.

Another example is when I’m “cleaning” a large csv file. Most times, I can record my movements cleaning a single line, and then replay those actions N times. You could do the same thing with a regex sometimes, but for really complicated files this is easier.

A final, simpler one: I have <Leader>f mapped to fd piped into fzf piped into open. Other editors probably have fuzzy file finders. Some of them maybe even use fzf internally.

But I think this example demonstrates how vim embodies UNIX ideas, as a modal text editor that depends on other binaries for complex behavior. People levy this as a complaint, that it doesn’t come feature complete, but it’s in reality a strength. Because while other editors wax and wane in terms of features and performance, vim only ever gets faster, as the binaries you depend on are swall out for better replacements every couple years.

Unfortunately I'm not understanding what makes vim special here

> It works wonderfully with make, so you can run “make $file” in a couple strokes

I can do this in any editor I've ever used

> Another example is when I’m “cleaning” a large csv file. Most times, I can record my movements cleaning a single line, and then replay those actions N times.

I can do this in most editors I used (VSC being an exception). I use recordable macros all the time to clean up lines in emas or slickedit or any other editor that has recordable macros

> A final, simpler one: I have <Leader>f mapped to fd piped into fzf piped into open. Other editors probably have fuzzy file finders. Some of them maybe even use fzf internally.

Can do this in every editor I've ever used too.

Any actual vim only examples?

To clarify, I don't think these (or any) features are "vim-only".

I was intending to say that it's the meta-feature of vim that vim-users find so sticky, that you can trivially write your own features: composing arbitrary executables and modal editing.

I think most editors nowadays are taking a page out of vim's book, by exposing increasingly lower-level interfaces to extension authors and users.

In these ways, I think editors are converging with vim, over time. Vim (and emacs) has been this way forever.

You don't have to wait for the editor-making company to accept that your strange request is valid, you can just hack it on yourself.

I've had all those features in every editor I've used since the late 80s so no, no one is taking a page from vim or emacs.
And don't forget regex uses!
> I am curious if any vim user has ever been able to see the benefits of other environments.

Yes they can. Let me list them: 1) Familiarity 2) Ready out if the box, less effort 3) For specific languages and projects, you can't do it vim. Javascript is not one of those. Maybe android development is.

> I am saying if I tried to start using vim today on the projects I'm working on the experience would be seriously inferior.

Correct, it would be a BIG pain, and I know because I have done it. It sucks hard. But if you suck it up and start molding this extremely flexible editor to your needs, after a few months you will get a far superior experience than your out-of-the-box IDE. The most important aspect of all is that you reason differently about writting and editing text, in a much more efficient way than normal.

But by no means do I judge people for not doing it, as I said in my initial comment, everyone has their needs. Vim turned out to give me great power and comfort after all and I can barely go back to another editor. Maybe it's not the same for you. All is fine.

I got pretty good with vim. I'd say it was the fastest I could ever edit text. It really can be insanely fast for editing text but ultimately, I don't like vim. I don't spend that much time literally editing text, like a copy editor. I spend much more time typing and thinking, and very little editing.

I can touch type both QWERTY and Dvorak. I usually type Dvorak, and the longer I type QWERTY, the more I get this mental fatigue of continually overriding what my fingers wanted to do. Using vim gives me a tinge of that feeling, that I wouldn't recognize as a hint of that feeling if I didn't know how the bigger version of the feeling feels after a day of typing QWERTY. It has something to do with the impedance mismatch of hitting keys in the wrong mode/forgetting what mode you're in (humans are terrible at moded interfaces) and throwing around a minilanguage for text editing in my head besides the actual task I need to do.

Saving 2 or 3 minutes of text editing a day isn't worth the aggravation.

I would say you can feel like you have a godlike sense of power over the text, like you're playing Age of Empires. Some people probably like that, and equate it with productivity and time-savings. It's optimizing for the wrong thing.

It worked out the opposite way for me. Using vim bindings keeps me in flow. If I don't have them I get aggravated, every time I have to slog through an inconvenient editing task because I changed my mind about some bit of code. It's not the seconds I save that makes me more productive, it's the mental state it helps me stay in.

It doesn't resonate with everybody, but I think it's going too far to say it's optimizing for the wrong thing.

A lot of us are fans of the keybindings more than Vim itself. For a long time my main editor was Visual Studio with Viemu.