Live data from Hacker News

Vim after 15 Years

statico.github.io

131–140 of 176 posts

Re: Vim after 15 Years

#131

Vim is the best lightweight single file editor there is. That’s all it should be. If you’re heavily configuring it, you should be able to answer “why is this better than an ide?” Without saying “vim makes me cool”. Also, if you can answer that, please let me know! To me, an IDE is better for everything but what default vim is good at. And if you tell me that typing is faster, please also tell me why that’s relevant!

So, a lightweight text editor eh? What about:

- Automatic compilation and error mapping into the codebase (supports make and parses gcc output by default).

- Function definition traversal with tags.

- File traversal over #include statements

- Syntax highlighting.

- Word completion with both on-page and tags file support.

It's sometimes easy to forget, but vanilla vim is a fully featured IDE for C. All this is really doing is extending that IDE functionality to support other languages, and adding innovations which have been made in other editors.

Re: Vim after 15 Years

#132
post #94

Earlier quoted context omitted.

That's what I don't get: for years, vi (and vim) mocked the emacs community (with some justification) for throwing everything and the kitchen sink into our editor. We were building an entire operating environment, while vi was providing a nice, solid, fast text editor. But with vim & neovim, people are building a complex operating environment in a terrible language, and ignoring the man-centuries of effort which have…

There's a lot of engineering in Vim as well. E.g., Vim's completion system is actually real cool once you learn it (it "clicked" for me after watching this video: https://www.youtube.com/watch?v=3TX3kV3TICU ). Vim regex, folding, and spellcheck also have useful features that you won't find anywhere else. More generally, I agree with you. If it were up to me I would prefer to use Emacs as a baseline. But it's not up t…

> More generally, I agree with you. If it were up to me I would prefer to use Emacs as a baseline. But it's not up to me, just like it wasn't up to Google to decide that Javascript wins. Ubiquity wins. Emacs lost.

I don't think one can really say 'emacs lost'; the game's not over yet. Yes, emacs really has lost popularity over the last decade, and yes vi really has maintained its popularity. But emacs still exists, new users are still coming to it — and at the end of the day, emacs is a better operating environment than vi. They are both pseudo-Turing-equivalent, in the sense that emacs can perfectly emulate vi & vi can perfectly emulate emacs — but emacs is extensible in a far better language than (vi)|(vim)|(neovim).

I maintain hope that as young programmers become old programmers, they will see the wisdom of true native apps (unlike Sublime), of free software (unlike TextMate) and that when they evaluate emacs vs. vi they will choose an editor they can use & extend for the rest of their lives.

Re: Vim after 15 Years

#133

Earlier quoted context omitted.

BTW, it does have a decent text editor. It's called Evil :)

FWIW, in all the times I've tried to use Emacs with Evil, it's still not been quite good enough. Enough friction here and there to bring me to a dead halt and make me reach for vim again.

same with me. tried everything to use evil with emacs (since i really wanted to use orgmode), but it's just not the same. the emacs keybinds get in the way of vim mode imho.

Re: Vim after 15 Years

#134

Earlier quoted context omitted.

Intellisense, in-line code documentation, debugger, unit tests, refactoring, file browser/project support, find usages/jump to definition, full project intelligent search. Even where vim supports these, it’s support is far weaker, less reliable, and much more painful to set up than IDE support. Among devs serious about productivity, it’s hard to imagine choosing vim.

>in-line code documentation What do you mean by this? Like folded comments? >debugger So, gdb? >unit tests You can write unit tests in vim. You can also run them, obviously. >refactoring Again, what do you mean? Now it feels like you are just listing stuff or maybe I just don't know what refactoring actually means. >file browser/project support Granted the build in file explorer is pretty stupid, but the standard `:f…

> >refactoring

> Again, what do you mean? Now it feels like you are just listing stuff or maybe I just don't know what refactoring actually means.

Agree with all your points. For this one, some IDEs support extracting lines of code into a method/function, figuring out what's an argument and stuff like that. It's a pretty nice feature that I don't believe is in vanilla vim, but it's something I can imagine writing a vim plugin for it.

Re: Vim after 15 Years

#135

Earlier quoted context omitted.

Intellisense, in-line code documentation, debugger, unit tests, refactoring, file browser/project support, find usages/jump to definition, full project intelligent search. Even where vim supports these, it’s support is far weaker, less reliable, and much more painful to set up than IDE support. Among devs serious about productivity, it’s hard to imagine choosing vim.

>in-line code documentation What do you mean by this? Like folded comments? >debugger So, gdb? >unit tests You can write unit tests in vim. You can also run them, obviously. >refactoring Again, what do you mean? Now it feels like you are just listing stuff or maybe I just don't know what refactoring actually means. >file browser/project support Granted the build in file explorer is pretty stupid, but the standard `:f…

>>refactoring

>Again, what do you mean? Now it feels like you are just listing stuff or maybe I just don't know what refactoring actually means.

It allows you to inline / rename variables and methods. It allows "safe deletes". It gives suggestions for improving code (i.e. if a best practice wasn't met or if there is some obvious improvement). "Move" or "extract" snippets of code into other/new files.

If you haven't used an IDE-like's refactoring capabilities I'd be surprised. Meanwhile, almost all of this is likely possible with the correct set of VIM plugin. I've just never had the time or energy to go find plugins, ensure they individually work as advertised, and work well all together, when I can just download Intellij and be extremely productive.

FWIW, I sync my laptop's directories to my remote dev box, so I rarely develop on anything but my macbook, but I do use Intellij with VIM bindings, so when I log into a remote machine I'm still quite productive.

P.S. I prefer VIM for Ruby / JS / Config files, etc.

Re: Vim after 15 Years

#136
post #106

I've been using vim about 20 years now. Maybe I'm weird but I don't use any plugins. When I want more than what Vim does I use something else. Autocomplete, find usages, etc? I'll use an IDE for that. When I need to refactor a 500MB text file without hanging my machine, I'll use vim.

I also prefer plain vim or plain neovim, mainly because plugins aren't guaranteed to be on the servers I have to do work on.

This only makes sense if you're on servers all the time, otherwise I wouldn't refuse to have a better workflow because of short period of inconvenience/annoyance.

Re: Vim after 15 Years

#137

Earlier quoted context omitted.

> I was split between using Emacs and Vim for last 2 years You're going to have to pick a side. You can't be an atheist that dabbles in Catholicism.

A friend of mine is an avid Spacemacs user (which, as far as I understand, is a Vim distribution running on Emacs or something like that). He has both a Vim and an Emacs sticker on his notebook next to each other, and they've been carefully applied so that they overlap each other both ways. Some men just want to watch the world burn.

I had tried spacemacs for a few months, it was nice overall, but everything seemed to be a little bit slower there than in vim, so I eventually switched back to vim.

Re: Vim after 15 Years

#138
post #136

Earlier quoted context omitted.

I also prefer plain vim or plain neovim, mainly because plugins aren't guaranteed to be on the servers I have to do work on.

This only makes sense if you're on servers all the time, otherwise I wouldn't refuse to have a better workflow because of short period of inconvenience/annoyance.

Agreed. I run many plugins locally and love that workflow. Just means you need to keep all the basic vim commands in in your head too for remote work.

Re: Vim after 15 Years

#139

Earlier quoted context omitted.

Intellisense, in-line code documentation, debugger, unit tests, refactoring, file browser/project support, find usages/jump to definition, full project intelligent search. Even where vim supports these, it’s support is far weaker, less reliable, and much more painful to set up than IDE support. Among devs serious about productivity, it’s hard to imagine choosing vim.

>in-line code documentation What do you mean by this? Like folded comments? >debugger So, gdb? >unit tests You can write unit tests in vim. You can also run them, obviously. >refactoring Again, what do you mean? Now it feels like you are just listing stuff or maybe I just don't know what refactoring actually means. >file browser/project support Granted the build in file explorer is pretty stupid, but the standard `:f…

For intellisense/documentation it means having method names, arguments, types, and short summaries pop up as you’re typing. E.g “print” might complete or printf and give you all you need to know to use it on the spot. While vim has autocomplete, I’ve never seen this documentation feature (even typed argument listings) and it’s extremely valuable to me.

Tags require a lot of manual work, so I consider them in the “worse” category of vim support for ide features.

Also, you shouldn’t mention gdb because the Ux is awful next to IDE integrations. Really. There’s no comparison here.

For unit tests ides can run individual unit tests with a single click.

Again, vim may support some of these features, but it’s UX is awful next to IdE Ux.

Also, I’ve been able to use VSCode over sftp, although it’s true vim can be pretty nice here. Personally don’t want to cart around a whole folder of plugins on top of vimrc, sounds like a pain.

Re: Vim after 15 Years

#140
post #106

I've been using vim about 20 years now. Maybe I'm weird but I don't use any plugins. When I want more than what Vim does I use something else. Autocomplete, find usages, etc? I'll use an IDE for that. When I need to refactor a 500MB text file without hanging my machine, I'll use vim.

> I'll use an IDE for that. These are usually attempts at reducing the need for IDEs, while keeping the familiar vim editing. With no exceptions so far, no IDE plugin (or emacs plugin, for that matter) has been able to emulate vim editing well enough to replace vim as my primary editor. Perhaps when neovim (or anything else) is able to give me native vim capabilities in a more extensible or powerful editor, I'll swit…

It sounds like you haven't given it a whirl. I've been on neovim for about about 3 years now after 5 years of native vim and it's been a complete drag-and-drop.
Post reply on HN