Live data from Hacker News

Porn, Zen, and .vimrc

karolis.koncevicius.lt

41–50 of 131 posts

Re: Porn, Zen, and .vimrc

#41
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?

i just keep a repo of public configs and curl them to any new machines and have a simple script to symlink the various configs to their expected locations

Re: Porn, Zen, and .vimrc

#42
It's been a while since I started using vim. I can see some similarities. Though, I didn't really do much configuration in the early days. Currently, I have pretty much no configs when it comes to key maps or some custom or shortcuts. I only add plugins for code completion and highlighting. Nothing else.

Re: Porn, Zen, and .vimrc

#43
post #42

It's been a while since I started using vim. I can see some similarities. Though, I didn't really do much configuration in the early days. Currently, I have pretty much no configs when it comes to key maps or some custom or shortcuts. I only add plugins for code completion and highlighting. Nothing else.

The added benefit of this is portability, as in your weird shortcuts aren’t burnt into muscle memory, so you can easily use Vim on any computer.

Re: Porn, Zen, and .vimrc

#44
post #43
post #42

It's been a while since I started using vim. I can see some similarities. Though, I didn't really do much configuration in the early days. Currently, I have pretty much no configs when it comes to key maps or some custom or shortcuts. I only add plugins for code completion and highlighting. Nothing else.

The added benefit of this is portability, as in your weird shortcuts aren’t burnt into muscle memory, so you can easily use Vim on any computer.

Exactly! I like being able to log in to any server and use vim/vi without any issues.

I've noticed similar pattern with other tools, e.g. git. I've seen coworkers add all kinds off aliases to simplify git commands, and I'm very much against it since I prefer portability.

Re: Porn, Zen, and .vimrc

#45
post #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.

If you can move your tabs to tmux, you will greatly improve your situation. It's easy.

Then you can, for instance, make your development machine a dedicated cloud server, like digital Ocean etc.

This is what I do and it's very nice to be able to use any hardware I want, including cheap underpowered stuff, since it's just a window to my real machine.

Re: Porn, Zen, and .vimrc

#46
post #12

The only map that I would say is an absolute improvement over the default is map ; : Using : is a waste of a keystroke (ie. shift) in an editor that I chose specifically to reduce chorded key combos.

I used to map like this, but then I found ; is to repeat f{char}. How do you repeat f command? Map it to another key? Use / instead?

Re: Porn, Zen, and .vimrc

#47
post #46
post #12

The only map that I would say is an absolute improvement over the default is map ; : Using : is a waste of a keystroke (ie. shift) in an editor that I chose specifically to reduce chorded key combos.

I used to map like this, but then I found ; is to repeat f{char}. How do you repeat f command? Map it to another key? Use / instead?

You could instead use F{char},, and then keep hitting , ;)

Re: Porn, Zen, and .vimrc

#48
I can't imagine remapping any of the standard commands. What if you have to edit something as a guest on someone else's system? Just get used to it and deal. I've been using it (in "vi" form) daily since 1985 or so and doing any of those remappings would drive me nuts.

Re: Porn, Zen, and .vimrc

#49
post #44
post #43

Earlier quoted context omitted.

The added benefit of this is portability, as in your weird shortcuts aren’t burnt into muscle memory, so you can easily use Vim on any computer.

Exactly! I like being able to log in to any server and use vim/vi without any issues. I've noticed similar pattern with other tools, e.g. git. I've seen coworkers add all kinds off aliases to simplify git commands, and I'm very much against it since I prefer portability.

The portability aspect seems overstated, or perhaps your use cases are just different. I can already log in to any server with my custom configs; Ansible is what configures my user already, so I just have it dump out my configs. If I can access it, it has my configs.

Admittedly, it does get annoying when I'm sudo-ed to another user, but it's vanishingly rare for me that I am both sudo-ed to another user, and doing enough editing that I really want those configs. Usually a sudo-ed vi for me is just updating a couple lines in a config, I don't need a full config for that

Re: Porn, Zen, and .vimrc

#50
post #44
post #43

Earlier quoted context omitted.

The added benefit of this is portability, as in your weird shortcuts aren’t burnt into muscle memory, so you can easily use Vim on any computer.

Exactly! I like being able to log in to any server and use vim/vi without any issues. I've noticed similar pattern with other tools, e.g. git. I've seen coworkers add all kinds off aliases to simplify git commands, and I'm very much against it since I prefer portability.

How many times does one remote into a server and then spend significant amounts of time editing files? Usually I make small enough edits that I don’t miss my custom keymaps
Post reply on HN