ivanlw
V2EX  ›  Vim

有什么方法自动备份.vimrc 和所有的 plugin, ftdetect……到 dropbox 吗?想在其他电脑上也可以快速配置……

  •  
  •   ivanlw · Apr 25, 2014 · 7048 views
    This topic created in 4574 days ago, the information mentioned may be changed or developed.
    25 replies  •  2014-04-28 12:47:55 +08:00
    Ken_Adams
    Ken_Adams
    Apr 25, 2014
    1
    我是這麼做的:
    1) 把 .vim 文件夾 和 .vimrc 文件都放進 Dropbox
    2) ln -s ~/Dropbox/.vim ~/.vim
    ln -s ~/Dropbox/.vimrc ~/.vimrc

    目前使用良好。
    arbipher
    arbipher
    Apr 25, 2014
    2
    neevek
    neevek
    Apr 25, 2014
    3
    你应该用github,像这样,一分钟内搞定所有。

    1) cd ~
    2) git clone https://github.com/neevek/vim.git .vim
    3) cd .vim
    4) git submodule update --init
    5) cp .vimrc ../
    sd4399340
    sd4399340
    Apr 25, 2014
    4
    用git来管理啊,github上有很多.dotfiles的项目
    fork一个别人的过来自己改改就好~
    我现在Mac上用的这个 https://github.com/PinkyJie/dotfiles
    litanwei
    litanwei
    Apr 25, 2014
    5
    github都是开放的,有一些不想公开的就没有办法了.
    jakwings
    jakwings
    Apr 25, 2014
    6
    Bitbucket 提供免费私有仓库。
    xdays
    xdays
    Apr 25, 2014
    7
    推荐个插件vundle
    ivenvd
    ivenvd
    Apr 25, 2014
    8
    推荐使用 VAM,这样你只需要保存一个 .vimrc 文件就可以了,插件会自动下载。
    y1
    y1
    Apr 25, 2014
    9
    @Ken_Adams 不需要把 vimrc 放到 dropbox 文件夹。只把 Symlink 放在 dropbox 中也可以同步的。
    dorentus
    dorentus
    Apr 25, 2014
    10
    github 又不能自动同步……
    ik0r
    ik0r
    Apr 25, 2014
    11
    我使用github进行管理, 到了新机器上直接make一下,
    自动安装 vim插件, 配置vimrc zshrc sublime gitconfig

    感兴趣的话,可以看看我的项目 https://github.com/jeremial/dotfile
    Tink
    Tink
    Apr 26, 2014
    12
    dotfile
    cloveryume
    cloveryume
    Apr 26, 2014
    14
    vundle +1
    anheiyouxia
    anheiyouxia
    Apr 26, 2014 via Android
    15
    一楼的方法是最简单的,以前我也是这么做的。如果目录多的话可以这个s原来的配置hell,下次重装或者换电脑后可以一键设置好关联。
    只有一个要提醒,小心dropbox不小心用你新的电脑的配置覆盖掉你。
    leebo
    leebo
    Apr 26, 2014 via Android
    16
    覆盖了也没关系有版本的 可以恢复
    qiukun
    qiukun
    Apr 26, 2014
    17
    自己写了脚本做 ln -s
    hector
    hector
    Apr 26, 2014
    18
    推荐个我自己的~
    https://github.com/myourys/Vimrc
    darkbill
    darkbill
    Apr 26, 2014
    19
    我的方式是,有一个专门的dotfiles文件夹,该文件夹和github同步。
    然后,自己把需要同步的文件都放到这里,写一个脚本,把相关的文件/文件夹`ln -s`到相应的位置上。。。
    不想公开同步的部分,则建立一个文件夹,同步到自己加密的dropbox上面。
    再一个类似的脚本,`ln -s`相关文件过去。

    到了新机器上,建立起相关的环境后,分别从不同的地方把文件同步过来,然后执行相应的脚本即可。
    ensonmj
    ensonmj
    Apr 27, 2014
    20
    @Ken_Adams stow管理链接,谁用谁知道
    ensonmj
    ensonmj
    Apr 27, 2014❤️1
    21
    @qiukun linux有专门的工具干这事,stow
    qiukun
    qiukun
    Apr 27, 2014
    22
    @ensonmj 给点个赞,目前的方案够用,将来看看
    yishanhe
    yishanhe
    Apr 28, 2014 via iPad
    23
    spf13-vim 帮你配置好基本的插件,你可以fork之后,添加一些自己的配置,里面有win和linux安装脚本 可以试试
    soli
    soli
    Apr 28, 2014❤️1
    24
    Dropbox 会丢文件!重要的文件千万别用 Dropbox。

    ps:遇 Dropbox 必黑之。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5084 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 65ms · UTC 06:59 · PVG 14:59 · LAX 22:59 · JFK 01:59
    ♥ Do have faith in what you're doing.