Hacker News new | ask | show | jobs
by lunchables 2771 days ago
>and you aren’t able to just walk up to vim somewhere else

Is this something people do? I use a handful of machines and use git+stow for managing my vimrc. I've never had this problem where I need to "walk up to vim somewhere else" where I wouldnt just clone my dotfiles and stow my vim config. Takes all of 10 seconds and I'm up and running.

3 comments

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.
I'd say yes; there are many times I've ssh'd into a server and wanted to do a quick edit where I don't have my vimrc; not going to bother to install it.

Complexity increases when you want one vimrc with many plugins to work on Windows, Linux and OS X, and both in your work and home environments.

I'm not arguing that Amp is the answer. I don't think I'd stick with vim as my daily driver if I couldn't customize it, and have the plugins I do.

In my routine work in an academic lab, im using 10-15 machines plus a number of GCP instances. Syncing a .dotfiles repo is a huge pain, especially when you make a small change on one machine and don’t want to push/pull ever time you want to do anything on another machine.
I fixed this problem for myself by automatically pulling down changes in the background upon opening a new terminal.

Since checking on every terminal open is unnecessary, I check on a probabilistic basis based on how often the backing git repo changes (0.5% - 3%, different repos for vim, dotfiles, configs).