This is my personal centralized cross-platform vim configuration and plugin git repo. This allows for sharing of vim/gvim environments between different machines (some unix, some windows), while keeping consistent set of settings. The setup is meant to be as simple as possible, but not simpler. I've decided to make this repo public in case anyone else may find it useful. Furthermore, issues can be reported in the issue tracker.
- Setup symlinks
- Initialize plugins
- Installing new plugins
- Removing plugins
Assume we cloned the repository into "C:\Users\john\configurations\vimfiles".
Then from your home directory (e.g.
C:\Users\john> mklink /D vimfiles C:\Users\john\configurations\vimfiles C:\Users\john> mklink .vimrc C:\Users\john\configurations\vimfiles\.vimrc C:\Users\john> mklink .gvimrc C:\Users\john\configurations\vimfiles\.gvimrc
Create symlinks to folder
.vim and files:
ln -s /path-to/vimfiles ~/.vim ln -s /path-to/vimfiles/.vimrc ~/.vimrc ln -s /path-to/vimfiles/.gvimrc ~/.gvimrc
git submodule init git submodule update
Installing new plugins
Simply unzip them into the "bundles" folder, e.g.:
These plugins are stored a git submodules, in the
bundle directory, and are
automatically loaded by a special plugin called
pathogen which is already
present in the autoload folder.
To add new plugins simply add them as a submodule to the "bundles" folder.
To add plugin such as
tabular (https://github.com/godlygeek/tabular), we first
strip out the "https" and use just "http", and then add it as a submodule to our
git submodule add http://github.com/godlygeek/tabular bundle/tabular git commit -a -m "Added tabular plugin"
Sometimes when you do
git status a submodule will show up as dirty. To fix this
.gitmodules file and add
ignore = dirty attribute to the affected plugin. E.g.:
[submodule "bundle/nerdtree"] path = bundle/nerdtree url = http://github.com/vim-scripts/The-NERD-tree.git ignore = dirty
To remove a plugin (stored as Git submodule) do the following:
- Delete a relevant section from
- Delete relevant section from
git rm --cached bundle/plugin_name, where
plugin_nameis the name of the plugin/module.
- Commit and delete untracked files.