Live data from Hacker News

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

gist.github.com

51–60 of 85 posts

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

#51

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…

There is no objective evidence that Vim makes you a more productive programmer. There is no evidence that avoiding a mouse makes you a more productive programmer. Use the editor you want! Vim is faster at some things and slower at some things. The main drawback of all the keypresses you see is that Vim is an imperative editor: You have to tell Vim how to edit text by glueing together lots of small commands.* IDEs are…

> Ask your local Vim nerd to rename the file they're editing. It will be entertaining!

Oh that’s easy though, friend :)

:!git mv % new-name

> IDEs are declarative editors, you say "rename this variable" and they do it.

Most NeoVim setups I’ve tried recently include LSPs with code actions, so now I just hover a variable and do “ra” and I get a little popup window asking me for a new name. I type it, hit enter, and the reference is updated in all relevant files.

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

#53
post #25

Earlier quoted context omitted.

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), a…

This sounds exactly like what I would expect from VSCode, and why I'm glad I never touched it with a 10 foot pole...

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

#54
post #16

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…

In my experience non-vim people are neither more or less productive than vim people. Pick your poison. Productivity comes down to so much more than typing/navigating/yanking fast. Especially when it comes to programming, which is 95% thinking, 4% swearing internally and 1% typing.

Spot on. The smartest guy I know uses cmd.exe and barebone emacs as notepad with tabs.

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

#55

Earlier quoted context omitted.

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 hear you and I raise you

> 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 } jump you to the previous/next new line, respectively. Also page up and down work of course, as well as arrows or j/k. But I’m rarely scrolling in vim because I know what I’m looking for and how to get there faster.

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

Fair, and in vim you have a single key to jump words (w/W) or the f/F commands (along with ;) to quickly jump through a single character in a line. Example:

This is a string and I want to get to the last letter.

If your cursor is at the beginning of the line, you can just type “fr” and then hit ; until you’re at the “r” in “letter”. Or hit $ since really you just want to get to the end of the line. Or “f.” since there’s only one period. Or…

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

And in Vim you can use / to search ahead, or ? to search behind. And n/N to jump to the next/previous match. Maybe your cursor is on the word you want to find more of in the file? Just hit * to jump to the next instance of it and n/N to jump next/previous.

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

#56

> if you think it's everywhere One of the counterpoint is vim not being available on Windows. But It is. Not by default, but most critical stuff aren't there by default anyway and vim will be one of the easiest block to have ready. Then Windows comes with WSL, where I think most people who even care in passing about vim will spend their time, so we're back to the editor they'd use on Linux anyway. That was to me the…

The "everywhere" argument is exactly about the defaults, otherwise there's no benefit, most alternatives are available via an install

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

#57
post #50
post #46

Earlier quoted context omitted.

imaging being so disconnected from reality to think that your editor of choice if something to brag about

One could say the same about any interest, really...imagine bragging what sort of car you drive, as if that makes any real difference. Of course, you say, driving some expensive car means you get more attention, right? Well, yes, and it doesn't make you any better of a person...if your text editor is your car and people care about what car you drive, then maybe it also gets you some attention... But yes it is sad tha…

My point was more that sometimes with modern internet it's quite easy to end up in a very specific and small bubble and think it represents the world.

But sure I guess you're right, as long as there is an audience willing to listen you can brag about anything. I can count on one hand people in my real life circle who would care about me using emacs.

Cars are different, they are related to economical accomplishment, which is more universally accepted as something to brag about.

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

#58

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…

There is no objective evidence that Vim makes you a more productive programmer. There is no evidence that avoiding a mouse makes you a more productive programmer. Use the editor you want! Vim is faster at some things and slower at some things. The main drawback of all the keypresses you see is that Vim is an imperative editor: You have to tell Vim how to edit text by glueing together lots of small commands.* IDEs are…

Ask your local IDE nerd to rename a variable in a language that is not supported by their IDE ;)

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

#59

Earlier quoted context omitted.

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…

Let’s say you want to change some text enclosed in parentheses (a very common operation in programming). How do you do that in your IDE? In Vim it’s just ci( .

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

#60

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…

There is no objective evidence that Vim makes you a more productive programmer. There is no evidence that avoiding a mouse makes you a more productive programmer. Use the editor you want! Vim is faster at some things and slower at some things. The main drawback of all the keypresses you see is that Vim is an imperative editor: You have to tell Vim how to edit text by glueing together lots of small commands.* IDEs are…

> IDEs are declarative editors, you say "rename this variable" and they do it.

With an LSP integration you get the exact same functionality in Vim/Neovim.

Post reply on HN