Hacker News new | past | comments | ask | show | jobs | submit login

I often need to use vim in servers that are not solely administered by me. It seems like bad etiquette to impose my configuration on my co-workers, so we leave it mostly unconfigured on these servers. There's also cases where I want to use vim in docker containers running web servers to debug by tracing execution in installed libraries by inserting prints and repl launching function calls, etc. It doesn't make sense to bother installing configuration each time the docker image is rebuilt, or including vim's installation and configuration in the Dockerfile.

I just do this minimal configuration on starting vim:

    :se et ai ts=2 sts=2 sw=2
Just that makes it usable enough for me to not feel a productivity loss most of the time.

EDIT: Key to that is not being so reliant on plugins, of course. I used to use a lot of plugins, but then focused on learning more of stock vim features, and doing more things in the shell. I now feel more productive without the plugins.

For example, I used to use NERDTree, but now I opt for using :e's path syntax. I don't get lost looking for files in the tree, scrolling around, opening directories. I just type stuff like :e %:h/fi<tab><enter> or :e %:s?local?global?<enter> to get straight to where I want without having to look at anything. I can probably work in vim blind-folded without a productivity loss (the only problem being remembering enough of the files I'm working on) and I find that awesome.




You're sharing accounts on servers or logging in directly as root? Either one sounds like a recipe for disaster.


Sharing a normal user account. It's not ideal, but it's not that bad either. I think you're missing a lot of context to properly judge this, but to keep it short and avoid divulging details it boils down to balancing costs, risks, and benefits. Remember you know nothing about my work. It's easy to underestimate costs, overestimate the risks, and overestimate benefits without being fully informed of the situation.


i switched away from emacs, and learned vi just because of that. to many servers with different versions of unix to make it worth the effort to install a different editor or customize its configuration.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: