I want to back up private vim configuration files and plug-ins to github, but some plug-ins are installed through vundle, and the directory has a .git repository.
What happens: When I am in the .vim directory
git init
git add .
git commit -m ""
git push
At this time, some submodules pushed to the github warehouse only have directory names and no files.
Google: You need to add the plug-in with the .git repository as a submodule to the .vim folder as a submodule,
but the tutorial on the git official website submodule does not say how to add the local git repository to another git repository as submodule.
Question: How should I completely back up the entire .vim folder to github? If I want to back up the .vimrc file, some plug-ins still need to be downloaded from the plug-in official website through vundle. Some plug-ins seem to be downloaded slowly because the server is abroad. , such as YouComPleteMe.
Git backup should not include Vundle backups in the first place. If you really want to copy to another place where the network is inconvenient, you can write a script to package the corresponding files.
For example, under Windows, I have a script win_init.cmd:
If you execute it directly, Vundle and other warehouses will be automatically downloaded. Check whether
.vimrc
和detorte
配色方案拷贝到Windows下的相应目录。然后检查curl
,ag
,ctags
,gtags
and other necessary tools are installed. If not, download them to the corresponding directory.win_init.cmd portable
, it will package all local Vim-related files, copy them to other machines and decompress them, and also include various plug-ins installed under Vundle.Then back it up locally