Live data from Hacker News

Porn, Zen, and .vimrc

karolis.koncevicius.lt

21–30 of 131 posts

Re: Porn, Zen, and .vimrc

#22
post #17
post #7

> This article describes my Vim journey, starting from heavy personal customization and ending with a renewed love for defaults this exact pattern is found in so many vi|m articles and is touted as a triumph of vim's default patterns, when it is really a failure of vim to support whole ranges of functionality. as a daily user of neovim, i know that vscode is a superior alternative and am waiting for a month off to tr…

I also find that vim defaults are very lackluster, I could spend all day listing its faults: - hjkl is not a reasonable default mapping for motion, for one it doesn't make it obvious that j is down and l is up since the keys are next to one another (which makes it a lot harder to memorise in the first place) but on top of that it wastes two very premium home row keys, h and l, for something that you really shouldn't…

I actually feel opposite on many of these things:

> but on top of that it wastes two very premium home row keys, h and l, for something that you really shouldn't end up using a whole lot

Even if with all the advanced search and move features, I still use the h and l keys pretty often. Being able to skip to a certain character is nice, but I find pretty often I just need to move a few characters forward or back, and a mindless `lll` is much easier than doing the mental math of which character I want to stop at and using the appropriate navigation command.

I've also grown to appreciate that the default keys are the most basic commands: on the right side, single-unit navigation, and on the left, basic character entry/removal.

> To make matters worse, the one key that's easiest to access on any keyboard, the space bar, is... just doing the same thing as l, it moves right. So now you have two of the best keys on the keyboard mapped redundantly to a relatively little used function.

I'm actually very thankful for this. I never thought about it before, but I realize that I never use my thumb when in Vim (other than to add spaces when typing normally) and I _think_ I like that. It let's me concentrate on the other fingers. Might be a matter of practice, but as it is I don't feel a need to incorporate the space bar or my thumb into my vim commands. It lets my thumb stay "dumb" so it doesn't interfere with any non-vim typing habits.

> If you wanted an IDE and tried to get Vim to do that by adding 3MB of vimscript from various sources to make it work I can't blame you for giving up, it's probably going to end up being a mess.

Agreed with this. For people that want to work in an IDE, they shouldn't work in Vim. Personally I dislike IDEs, and in part use vim to stick to a (relatively) simple editor.

Re: Porn, Zen, and .vimrc

#23

For me Vim productivity gains have more to do with never leaving the shell. Desktop environments are maddeningly rife with distractions

Same. My normal set up is having a shell window with 4 tabs:

1. Text editing 2. Command Line 3. Program logs 4. Code console

Flipping through them is a breeze, and I never have to leave Terminal. The displays are always simple, straight forward, and focused. No distractions. I'm able to just get in the zone with the code and forget anything else exists.

Re: Porn, Zen, and .vimrc

#24
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."

Re: Porn, Zen, and .vimrc

#25
> Now, after all the struggle, my vimrc is around 50 lines in length. It only includes simple and frequently used commands, like this map to toggle search highlighting with ctrl-/

Isn't the usual one (perhaps it's even default) leader (default \)-l?

I used to use Esc, which honestly I really do prefer (intuitivly - I'm in 'search mode', ESC to get back to normal), but it's somewhere between painful and impossible to portably implement without weird bugs, so I eventually gave in.

Re: Porn, Zen, and .vimrc

#26
post #13
post #7

> This article describes my Vim journey, starting from heavy personal customization and ending with a renewed love for defaults this exact pattern is found in so many vi|m articles and is touted as a triumph of vim's default patterns, when it is really a failure of vim to support whole ranges of functionality. as a daily user of neovim, i know that vscode is a superior alternative and am waiting for a month off to tr…

I've always seen it as a trade-off based on what I'm using Vim a lot for. When I'm using Vim remotely on a hundred different systems I admin, then having a good grasp of of being comfortable using the defaults is extremely useful, and it feels painful to try to use something that's not enabled by default that is my preference. When I'm doing developing something more complex, I definitely appreciate more customizatio…

Managing servers was why I started using vim other places. I started to use it for basic text editing and for coding, just so I could practice and not feel dumb when I needed it (far too often) on a production box. I also avoided too much customization for this reason too.

Still use vim for as much as I can. The language is too rich, and there’s a lot of muscle memory I’ve built up. It also tickles some part of my brain that’s always looking for better, faster, more effortless ways to do things, so I feel like it prompts learning in ways no other software I’ve used does.

Re: Porn, Zen, and .vimrc

#28
post #27

I wonder, what is the preferred way to install configuration files such as .vimrc, .bashrc etc. across all the machines a user logs into?

For me, the only machines I log into and use are my own, so I use ansible to manage local configs.

Re: Porn, Zen, and .vimrc

#29
post #21

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

This should be cited whenever monstrous dotfiles are produced without understanding the reason for defaults.

I often see Emacs newbies stealing hundreds of LOCs from different sites, only to end up with a lot of added complexity that is hard to understand let alone maintain. I imagine it's the same for Vim.

Emacs defaults are quite usable. I've been using Emacs for 15 years and I'm only altering a dozen variables. The rest of my .emacs is simply use-package directives. As I become more proficient, I trim down my dotfiles, not the other way round.

Some defaults seem to be there for historical reasons. When I see such a thing, I wait a few months. If I'm still convinced the default is legacy code, I try to lobby for a change. I've found that developers tend to be very receptive if changes can be well justified. E.g. there's a long discussion now in emacs-devel on how to modernize many defaults and make the editor more friendly.

My goal is to push all my dotfiles upstream, and end up with almost empty configurations. And I'm getting there.

Re: Porn, Zen, and .vimrc

#30
I once decided to try an online vim profile generator when setting up after a disk crash, to save time re-creating my simplistic .vimrc. It was awful. All sorts of things I never used normally in Vim, forced down my throat. Manpage-reading plugins, bizarre brace handling, different buffer control, and a Day-Glo colorscheme implemented in some annoying-to-override fashion.
Post reply on HN