I use Ubuntu as my desktop OS. I want my vim to be portable so that I can use my vim configuration as well as the plugins I use in my college PCs too. Is there any way to have a portable version of Vim for Ubuntu or similar Linux distros?
2 Answers
Save your .vimrc online and download it to each computer you use. Make sure Vim is installed on each one of those computers.
Echoing tluafed’s answer, one solution is to version control your configuration and clone/symlink it on each machine. Then keeping up-to-date is as easy as pulling changes on each machine.
This is particularly easy using e.g. github. You can find a number of dotfile repos (including mine) there. My repo contains vim configuration, a large number of other dotfiles, and an installation script (since I’m doing more than just symlinking things). However, you can browse it to get a basic idea of how to set up a vim config or dotfiles repo, and optionally write a script to do the symlinking for you. This is a fairly common solution.
Note that some plugins may not be compatible with all versions of Vim, so if running more than one version you’ll need a way to disable plugins on a per-machine basis. I use git submodules for this, allowing me to simply activate the ones that work.