vim:在多个主机上同步所有插件的最佳实践是什么 [英] vim: what the best practice to sync up all plugins on multiple hosts

查看:54
本文介绍了vim:在多个主机上同步所有插件的最佳实践是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开始使用 vim 插件管理工具来管理我的 vim 插件,例如 vundle,并且我有多个主机并希望它们与 vim 设置同步.目前我正在将 .vim 目录检查到 git repo 中.但我不想检查所有插件,因为它们属于其他插件.想知道如果我使用插件管理工具保持同步而不检查插件代码,最佳做法是什么

I am trying to start using a vim plugin management tool to manage my vim plugins, like vundle, and I have multiple hosts and want them syncing with vim settings. currently I am checking the .vim dir into a git repo. but I don’t want to check in all plugins as they belongs to others. Wonder what would be the best practice if I use the plugin management tool to keep them sync without checking in plugins code

推荐答案

如果你使用了插件管理,比如 vundle,你就不必将你的 .vim 目录推送到 git repo.您只需将 .vimrc 文件推送到 git.因为vimrc应该已经配置好了vundle并声明了你想要的插件.

if you used plugin mgmt, like vundle, you don't have to push your .vim dir to git repo. You just push your .vimrc file to git. Because vimrc should have already configured vundle and declared which plugins you want to have.

你可以在新主机上做什么:(假设你把 vundle 放到 $HOME/.vim/Bundle)

What you can do on a new host:(assume you put vundle to $HOME/.vim/Bundle)

  • 从 git repo 中拉取 .vimrc 文件

  • pull your .vimrc file from git repo

获取 vundle:git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

然后打开vim,运行:PluginInstall.您拥有所有插件.

Then open vim, run :PluginInstall. You have all plugins.

这篇关于vim:在多个主机上同步所有插件的最佳实践是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆