Live data from Hacker News

Don't use Vim for the wrong reasons (2020)

gist.github.com

31–40 of 85 posts

Re: Don't use Vim for the wrong reasons (2020)

#31

What is the consensus on productivity with Vim? I have thought about trying out the keyboard only approach, but haven't wanted to invest time in it yet. When I see people on YouTube using Vim it slightly feels like there's a whole lot of keypresses happening, but not a lot is actually gained compared to using a mouse or even frequently it seems it takes a while to do something that is much quicker with the mouse. I u…

The difference in productivity is hard to measure. What's really gained by vim bindings is not having to leave flow state to move the cursor over there and then change that word for a different one. The same operating can be done with a cursor, but in having to leave home row and then come back to it, your mind has a chance to wander and you start thinking about whatever else is going on in life. Like why you're usin…

One thing I'm concerned about is that, if I'm moving around the files, then there's already very quick keyboard commands available for that.

And if I want to look around a single file, I feel like anything else besides scrolling would be quite inferior in terms of speed and accuracy.

And moving around lines and words is already quite optimal enough without a mouse, using arrows and option/command modifier.

So mostly I use mouse when I need to scroll around the file or click on a certain imported identifier to move to its definition.

And also I use a lot of ctrl + f to move around, which I find quite reliable.

Re: Don't use Vim for the wrong reasons (2020)

#32
post #25
post #7

One of my favorite things about using vim as my main IDE is, I can run it on a linux server. My work has me moving around the country. I program on a vim instance running on a remote server. I just need to carry a tiny laptop around. I usually get an okay ping( edit- Incase anyone is wondering, I actually started doing this since one of my laptops once got lost while traveling. Airline did find mybag later, but the t…

Does that have any advantage over VSCode Remote SSH?

Yes.

1. You're already in your terminal.

2. You get to use Vim (if that's your thing).

3. You don't have to use VSCode (if it's not your thing).

Re: Don't use Vim for the wrong reasons (2020)

#33
Ironically text editing is the thing I like least about vim. I would switch to an IDE if it provided the level of programmability Vim has. For example, I have a binding which, when used on a netlink command, opens the corresponding implementation in the kernel. How do you do that in something like VSCode? I guess I could write an extension, but in Vim it takes like 2 lines of code that you write once and forget about it.

Or another example - you can analyze log files in terminal buffer by folding based on patterns, multi-color highlighting, etc.

Re: Don't use Vim for the wrong reasons (2020)

#34
post #32
post #25

Earlier quoted context omitted.

Does that have any advantage over VSCode Remote SSH?

Yes. 1. You're already in your terminal. 2. You get to use Vim (if that's your thing). 3. You don't have to use VSCode (if it's not your thing).

Pretty much this. And,

4. Not MS.

Re: Don't use Vim for the wrong reasons (2020)

#35
> While some recent advancements may hint at future changes in that direction, Vim currently lacks everything it would need to be considered/used as an IDE.

I disagree. Neovim can be considered an IDE with the caveat that you have to configure it as such and use plugins.

> From sketchy terminal integration

What's so sketchy about it? The terminal integration in both Vim and Neovim are decent, and you can always do Ctrl+z to go back to your "proper" terminal and do whatever.

> to being single-threaded

Sure, everything isn't multithreaded although you can write asynchronous configurations and plugins.

Regardless, Neovim is more than fast enough (and certainly much faster than the comparable IDEs) so I don't see the critique being valid.

> via the lack of anything resembling a proper internal plugin API

Neovim has a very good API for writing plugins in Lua.

> nothing in Vim can be leveraged to give you a convincing Integrated Development Environment.

That's just false and ignorant.

Re: Don't use Vim for the wrong reasons (2020)

#36
post #35

> While some recent advancements may hint at future changes in that direction, Vim currently lacks everything it would need to be considered/used as an IDE. I disagree. Neovim can be considered an IDE with the caveat that you have to configure it as such and use plugins. > From sketchy terminal integration What's so sketchy about it? The terminal integration in both Vim and Neovim are decent, and you can always do Ct…

[deleted]

Re: Don't use Vim for the wrong reasons (2020)

#37
post #25
post #7

One of my favorite things about using vim as my main IDE is, I can run it on a linux server. My work has me moving around the country. I program on a vim instance running on a remote server. I just need to carry a tiny laptop around. I usually get an okay ping( edit- Incase anyone is wondering, I actually started doing this since one of my laptops once got lost while traveling. Airline did find mybag later, but the t…

Does that have any advantage over VSCode Remote SSH?

While I don't use VSCode myself, many students and faculty at my school did, and the VSCode SSH extension seems to have some performance issues. It works by copying a server binary onto the remote computer; however, that process is quite heavy in terms of resource usage on the remote, using hundreds of MB of RAM in usual cases (which adds up when you have hundreds of students doing their assignments on one server), and 10s of GB at the extreme. It's also particularly bad about cleaning up after itself: oftentimes, when users disconnect their session, the VSCode instance continues running on the remote server forever until it's manually killed (and every time the user starts a new session, it starts a new process instead of reusing an old one).

Our school servers have a 200-process-per-user quota to prevent accidental fork bombs; students frequently hit this limit and become unable to log into a shell, because their entire quota is taken up by VSCode SSH processes that have accumulated over months.

The combination of these two effects have caused serious problems over the past couple years as VSCode adoption has rapidly increased among the student base, to the point that some professors have banned VSCode from their classes, due to the SSH extension making the class servers completely unusable for everyone during the big rush a few hours before an assignment is due.

Re: Don't use Vim for the wrong reasons (2020)

#38

I'm a big fan of Vim, but I hardly use it as my primary editor anymore (applies for Neovim as well). I think the ecosystem is amazing, but I hardly have the patience to set things up to feature parity with other editors. Debuggers are the biggest missing/hard to configure feature. I do, however, use Vim bindings in every editor that supports them (and extensions for browsers like Vimium). The extensions/Editor functi…

For 20+ years I did all my coding, development, and miscellaneous tasks in Emacs. But I used vim exclusively for writing emails - initially with mutt, and later with different mail clients.

There were times, now and again, where I'd use vi, or vim, on solaris, or other "weird" systems. But basically I used vim for emails and emacs for everything else, and I think that was a good split.

Were I telling somebody to start a new editor these days I think I'd probably echo the recommendation to use the integrated tutorial, but after that just "jump in". gvim, emacs, and similar have menubars that help with many things before you learn the keystrokes required and there's no shame in using them. The article suggests learning and experimenting before switching, but to me that seems very counter-intuitive.

Re: Don't use Vim for the wrong reasons (2020)

#40
post #25
post #7

One of my favorite things about using vim as my main IDE is, I can run it on a linux server. My work has me moving around the country. I program on a vim instance running on a remote server. I just need to carry a tiny laptop around. I usually get an okay ping( edit- Incase anyone is wondering, I actually started doing this since one of my laptops once got lost while traveling. Airline did find mybag later, but the t…

Does that have any advantage over VSCode Remote SSH?

No sync issues, no freezes. Your code editor/tools/coding happens in a single computer.

VScode remote extensions are really good though, the best of any GUI editor. But that BLOB it installs on remotes can take a good chunk of scarce VM RAM.

Post reply on HN