如何保存/还原Sublime Text 2配置/插件以迁移到另一台计算机? [英] How to save/restore Sublime Text 2 configs/plugins to migrate to another computer?

查看:327
本文介绍了如何保存/还原Sublime Text 2配置/插件以迁移到另一台计算机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从一台Mac迁移到另一台Mac,并希望新计算机上的Sublime Text 2具有与旧计算机上安装的所有相同的配置/插件.

I need to migrate from one Mac to another, and want Sublime Text 2 on a new computer to have all the same configuration/plugins I have installed on the old one.

是否存在一些我可以复制并还原到另一个文件夹以复制所有内容的文件夹?

Is there some folder(s) I could just copy and restore on another one to replicate everything?

推荐答案

我为此设置了一个很好的解决方案,它需要使用保管箱.我目前正在使用它来同步Windows,Linux,OSX和一些vm上约5种不同的Sublime安装中的插件和设置.

I just set up a good solution for this, it requires dropbox. I am currently using this to sync plugins and settings across ~5 different sublime installs on windows, linux, osx, and a few vm's.

  • Step 1: use PackageControl to manage all your plugins, its awesome.

步骤2:将"Sublime"目录添加到您的根保管箱目录(我复制了完整的目录结构{DropBox}/Sublime/Packages/User).确保sublime已关闭,并将{SublimeRoot}/Packages/User的内容移至您刚创建的保管箱目录中.删除{SublimeRoot}/Packages/User,然后将其替换为指向{DropBox}/Sublime/Packages/User的符号链接.

Step 2: Add a "Sublime" directory to your root drop-box directory (I replicated the full directory structure for the hell of it, {DropBox}/Sublime/Packages/User). Make sure sublime is closed, and move the contents of {SublimeRoot}/Packages/User in to the dropbox directory you just made. Delete {SublimeRoot}/Packages/User, and replace it with a symlink that points to {DropBox}/Sublime/Packages/User.

在使用sublime的每台计算机上使用相同的过程,它可以完成两件事.

Use this same process on every computer where you use sublime, it accomplishes 2 things.

  • 1)User/目录的内容已同步,因此所有自定义设置在计算机上都相同.

  • 1) The contents of your User/ directory are synced, so all your custom settings are the same across machines.

2)每次PackageControl启动时,它都会检查User/目录中的Package Control.sublime-settings.如果找到了应根据设置安装但未实际安装的插件,它将自动安装它,而不会出现任何问题.

2) Every time PackageControl starts up, it checks the Package Control.sublime-settings in your User/ directory. If if finds a plugin that should be installed according to the settings, but isn't actually installed, it automatically installs it, no questions asked.

使用此解决方案设置另一台计算机只需要安装Sublime和程序包控制,然后删除{SublimeRoot}/Packages/User/目录并将其指向带有符号链接的保管箱中的副本即可.下次启动sublime时,程序包控制将自动安装所有插件.

Setting up another computer with this solution simply requires sublime and package control to be installed, then just delete the {SublimeRoot}/Packages/User/ directory and point it to the copy in dropbox with a symbolic link. Next time you fire up sublime, package control will automatically install all your plugins.

创建符号链接 :从{Sublime}/Packages目录执行

  • Windows :mklink /D .\User C:\Users\[username]\Dropbox\Sublime\Packages\User
  • Linux/OSX :ln -s {DropboxRoot}/Sublime/Packages/User ./User
  • Windows: mklink /D .\User C:\Users\[username]\Dropbox\Sublime\Packages\User
  • Linux/OSX: ln -s {DropboxRoot}/Sublime/Packages/User ./User

这篇关于如何保存/还原Sublime Text 2配置/插件以迁移到另一台计算机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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