Live data from Hacker News

Porn, Zen, and .vimrc

karolis.koncevicius.lt

91–100 of 131 posts

Re: Porn, Zen, and .vimrc

#91
post #82

Earlier quoted context omitted.

> One thing I never understood is why Vim bindings are a big gain when you have a mouse. Vim bindings are a gain because you don’t have to use the mouse.

I've yet to find a study that would validate that claim.

I think this can largely be attributed to preference. I have my hands on the keyboard anyways when I write code, so I find it easier to just move with keys instead of grabbing the mouse. For bigger, espacially vertical movements, I usually grab my mouse, unless I know the line I have to jump to. In that case using the movement keys would be faster as well.

Re: Porn, Zen, and .vimrc

#92
post #77

Earlier quoted context omitted.

One thing I never understood is why Vim bindings are a big gain when you have a mouse. I see a single edit, it takes me all of one second to click for a large jump, even less for cursor key combos in case of a small jump. For mass edits there is find/replace and find+multi cursor. 80% of my time in the editor I spend thinking about the code anyways - I have zero interest to optimize deciseconds of my time, or worse,…

> I have zero interest to optimize deciseconds of my time, or worse, optimize my perceived productivity vs. my actual productivity (e.g. forcing myself away from the mouse by ways of pattern matching that increases both mental overhead and time required). I think you just said it. Its not interesting/nor a priority for you to optimize things to that level. Those using vim properly and trying to move away from the mou…

Not sure if you over read the second part of that phrase, but I have serious doubts whether the efficiency gains touted by Vim users are real or only perceived. I'd like to see some good hard data on that, comparing users of similar proficiency level at various editing styles.

Re: Porn, Zen, and .vimrc

#93
post #21

Chesterton's Fence: https://en.wikipedia.org/wiki/Wikipedia:Chesterton's_fence

> "If you don't see the use of it, I certainly won't let you clear it away. Go away and think. Then, when you can come back and tell me that you do see the use of it, I may allow you to destroy it."

I can't stand this. If Chesterton thinks he has all the power, why doesn't the onus to know "the use of it" fall on him? He should be responsible for documenting the purpose and motivations behind the fence, if he thinks he's such a protector.

Anyway, this stance seems to be what separates conservative from a liberal. Conservative want to protect something that exists but he has no knowledge of reason - such as people protecting slavery, racism, etc. Putting up barriers against people trying to change world for the better.

Re: Porn, Zen, and .vimrc

#94

I personally find vin to be a good tool for editing text without leaving the terminal. But when I’m writing a lot of code, I’ve found the vim ide concept to be far more trouble than its worth. Modern IDEs like VSCode + Vim bindings is my preferred platform

One thing I never understood is why Vim bindings are a big gain when you have a mouse. I see a single edit, it takes me all of one second to click for a large jump, even less for cursor key combos in case of a small jump. For mass edits there is find/replace and find+multi cursor. 80% of my time in the editor I spend thinking about the code anyways - I have zero interest to optimize deciseconds of my time, or worse,…

It's not about optimizing for speed; it's about optimizing for comfortability. Not having to move your hands at all from the keyboard is highly underrated. If you pair it with a windows manager like i3 and use something like vimium on chrome or zathura for pdf, you always have your hands on your keyboard. You don't realize how great that is until you try it. You can't go back to the mouse.

Re: Porn, Zen, and .vimrc

#95

Earlier quoted context omitted.

Also drop the first word of the title. Click bait

I think it makes sense in context, where many tech enthusiasts do almost fetishise their or other's configurations as nerd cred. Just look at /g/ board on 4chan, people post their neofetches and compare kernels.. Let's all just move on from this trend of things that are sexy in a category being regarded as 'porn': earthporn, cityporn, natureporn. Maybe I am getting old..

and the poorly named babyporn

Re: Porn, Zen, and .vimrc

#96
post #83

I agree that defaults are good! I have to at least "set number" in my vimrc, and most importantly get rid of those horrible swap files. Here's my minimal vimrc if anyone is curious https://gitlab.com/jane314/settings-and-scripts/-/blob/maste...

All it’s missing is ‘set expandtab’ ;-)

Noo I like tabs! Maybe you can explain to me, I genuinely do not get why people are religious about spaces instead of tabs. You have to backspace more times to get rid of an indent!

Re: Porn, Zen, and .vimrc

#97
post #82

Earlier quoted context omitted.

> One thing I never understood is why Vim bindings are a big gain when you have a mouse. Vim bindings are a gain because you don’t have to use the mouse.

I've yet to find a study that would validate that claim.

The gains from vim over using the mouse is mainly muscle memory for me.

I can comment out a function/block/line from anywhere in the function without looking at either the screen or the keyboard. And I do it without consious effort.

You probably use keyboard shortcuts to go to the end/start of the line anyway, if you expand that to all the vim movements that's what you gain. Adding composition and macros are just the icing on the cake.

Re: Porn, Zen, and .vimrc

#98

I personally find vin to be a good tool for editing text without leaving the terminal. But when I’m writing a lot of code, I’ve found the vim ide concept to be far more trouble than its worth. Modern IDEs like VSCode + Vim bindings is my preferred platform

One thing I never understood is why Vim bindings are a big gain when you have a mouse. I see a single edit, it takes me all of one second to click for a large jump, even less for cursor key combos in case of a small jump. For mass edits there is find/replace and find+multi cursor. 80% of my time in the editor I spend thinking about the code anyways - I have zero interest to optimize deciseconds of my time, or worse,…

The whole point of vim binding is to reduce context-switching to the mouse, better maintaining flow.

Once you get good at Vim + a tiling window manager, constantly swapping to a mouse to do things interrupts your flow. It’s akin to forced context-switching, which programmers hate because that also interrupts flow and concentration.

But it does take practice to master enough Vim commands to be able to use it without referring to help docs (which also interrupts flow). You won’t really understand this flow advantage until you’ve done that.

Fwiw, Wall Street culture has something similar around Excel. The best, most proficient Excel masters can use Excel with keyboard only, no mouse, b/c they’ve mastered all the keyboard shortcuts for navigation, data entry, and calculation. They judge each other based on this ability. It’s not unprecedented in the software development community only.

Re: Porn, Zen, and .vimrc

#99

Earlier quoted context omitted.

One thing I never understood is why Vim bindings are a big gain when you have a mouse. I see a single edit, it takes me all of one second to click for a large jump, even less for cursor key combos in case of a small jump. For mass edits there is find/replace and find+multi cursor. 80% of my time in the editor I spend thinking about the code anyways - I have zero interest to optimize deciseconds of my time, or worse,…

It's not about optimizing for speed; it's about optimizing for comfortability. Not having to move your hands at all from the keyboard is highly underrated. If you pair it with a windows manager like i3 and use something like vimium on chrome or zathura for pdf, you always have your hands on your keyboard. You don't realize how great that is until you try it. You can't go back to the mouse.

And if your my kind of programmer, you start to move to programs that have VI keybindings, swap out for ones that do, and hack into the ones that don't to make them do!

Re: Porn, Zen, and .vimrc

#100
The three things I have in my .vimrc are

se ts=4 #1 tab= 4 spaces

se ic # ignore case when searching

se nows # don't wrap to top when you reach end / beginning of file in a search.

I could add a lot more, eg a json / xml formatter but never got around to it in 21 years.

Post reply on HN