I use vim on different machines and want my configuration to synchronize between them, so I tried to use the well-known pathogen approach to install different vim plugins, saving them as git submodules, as described, for example, here .
Now my .vim folder is a git repository that contains each folder in .vim/bundle as submodules. I uploaded this main repo to a bitbucket and cloned it from my other machines, and after some git submodule init and git submodule update I get the same configuration in all of them as you would like.
Now the problem arises when I need to make some settings in some of these plugins. For example, some of the submodules are just vim colors schemes. Suppose I want to change, say, the color of comments. What would be the right way to do this?
Some ideas came to my mind:
- If I directly change
.vim/bundle/vim-github-colorscheme/colors (for example), then AFAIK, I have to push these changes to the main vim-github-colorscheme repo, which I cannot, and would be funny anyway. My settings are private in nature. But if I do not synchronize with the submodule repository, these changes will not be visible from my other machines. - If I save my own colorscheme settings in
.vim/colors , then these changes will be part of the main repo, and they will be easily shared between machines, but this violates the βbundleβ of pathogen philosophy. In addition, I do not understand how to perform this method of other settings (for example, modifying some fragments for snipMate or even changing the plugin code). - Should I make a private plug-in plug-in, upload it to bitbucket and use it as a submodule instead of the original one? Thus, at least I could correctly make the approach in 1., but it does not look like a good option. Specifically, because I donβt know in advance if I will need to configure the plugin, so this will force me to fork every new vim plugin that I install, just in case.
- I could save the package code in one git repository, i.e. Do not use submodules at all. This will give me the freedom to modify them, synchronize the changes with my bitbucket replica and deploy them to all my machines with a single
git pull . However, this way, when changes are made to the original source of the plugin, it will be difficult to combine it with my own modifications.
I have run out of ideas, and all of the above seems to me wrong for one reason or another. How do people who use git and pathogen manage this scenario?
source share