Hacker News new | ask | show | jobs
by sdrothrock 3379 days ago
One of the reasons I like vim is that I can find vim or vi almost anywhere I need to work, but I try not to configure it too much (and lose out on what people say is one of the greatest advantages) BECAUSE I work on so many servers... is there a solution other than "carry your config and plugins everywhere?"
2 comments

Tramp mode in Emacs is great for this, you can edit files over ssh seamlessly from your desktop. It works even better if you use Emacs as a terminal, as then you pretty much use tramp for everything.
Upload your vimrc file and .vim directory to github and just do a clone on every new server.
I used this approach, but the problem with it is that all the plugins should be synced in it, so the repository becomes larger and larger with time, or kept as submodules what adds additional friction. Also you should manually copy .vimrc to your home directory from the cloned repository.

So I put to the repository only .vimrc and an short shell script install.sh that installs Vundle, .vimrc, and then installs all the plugins by running "PluginInstall" command in vim. Installation becomes just cloning the repo and running install.sh from it.

The additional benefit in comparison to say putting plugins to git submodules is that I don't have to keep my vim repository at GitHub up-to-date with latest plugins versions because Vundle anyway installs the freshest versions.

My point, which I didn't state clearly, is that there are situations where this isn't really feasible; secured networks, servers not on the internet, etc.