如何使用 Windows 将 Sublime Text 3 的设置从一台 PC 导出/导入到另一台?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24254397/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 11:37:31  来源:igfitidea点击:

How can I export/import settings of Sublime Text 3 from one PC to another using Windows?

windowsimportexportsettingssublimetext3

提问by user3746779

I use Sublime Text 3 in my company and I want to export all the settings, including packages and whatever, to use the same configurations in Sublime Text 3 I have at home. How can I do this?

我在我的公司使用 Sublime Text 3,我想导出所有设置,包括包和其他任何东西,以便在我家里的 Sublime Text 3 中使用相同的配置。我怎样才能做到这一点?

PS.: I use Windows 8

PS。:我使用Windows 8

回答by Sergey Telshevsky

The best way is to sync the Userdirectory, there are multiple available ways to do this - dropbox, git and manual ways.

最好的方法是同步User目录,有多种可用的方法来做到这一点 - dropbox、git 和手动方式。

Installed packages are registered in Package Control.sublime-settings, which is located in the user folder as well, thus, it does not require you to sync anything besides that. A pretty good guide to syncing can be found here.

已安装的包在 中注册Package Control.sublime-settings,它也位于用户文件夹中,因此,除此之外,它不需要您同步任何内容。可以在此处找到非常好的同步指南。

You also may wish to check out this package.

您也不妨看看这个包

回答by Jazastry

For me (Windows installation) transferring all the content from old installation - AppData\Roaming\Subime Text 3, to new installation - AppData\Roaming\Subime Text 3, does the job. All the packages and UI settings are transferred and are working correctly.

对我来说(Windows 安装)将所有内容从旧安装 - AppData\Roaming\Subime Text 3 转移到新安装 - AppData\Roaming\Subime Text 3,可以完成这项工作。所有包和 UI 设置都已传输并正常工作。

回答by Prasanna Saraswathi Krishnan

None of the manual efforts are needed now (I think). Both sublime text (ver 3) and visual studio code (if anyone cares) have extensions that do this for us.

现在不需要任何手动操作(我认为)。Sublime Text(第 3 版)和 Visual Studio 代码(如果有人关心)都有为我们执行此操作的扩展。

For VS Code - https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync

对于 VS Code - https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync

For ST3 - https://packagecontrol.io/packages/Sync%20Settings

对于 ST3 - https://packagecontrol.io/packages/Sync%20Settings

With a few clicks like generating token and configuration, one should be able to easily port the settings from any machine (Win, OSX, Linux) to any machine.

只需点击几下,比如生成令牌和配置,就应该能够轻松地将设置从任何机器(Win、OSX、Linux)移植到任何机器。

回答by convexbytes

You can try this plugin PackageSync. It can package your settings and packages into a zip or 7z file, then, you can import them on another machine.

你可以试试这个插件PackageSync。它可以将您的设置和包打包成一个 zip 或 7z 文件,然后,您可以将它们导入到另一台机器上。

回答by user2784627

As an aside an easy way to locate the 'User' or 'Sublime text {2/3/etc}' folder regardless of OS is to:

另外,无论操作系统如何,定位“用户”或“崇高文本{2/3/etc}”文件夹的简单方法是:

Open go-to-anything and just type: 'us'

打开 go-to-anything 并输入:“我们”

From the available options select 'Preferences: Package Control Settings - User' to open that file.

从可用选项中选择“首选项:包控制设置 - 用户”以打开该文件。

Right click on the file and make the selection to open the containing folder (Mac: reveal in finder)

右键单击文件并进行选择以打开包含的文件夹(Mac:在 finder 中显示)

Navigate back up to the parent folder Sublime Text 3 (or whatever version number you are on)

导航回父文件夹 Sublime Text 3(或您使用的任何版本号)

Copying this folder and replacing the Sublime Text 3 folder in a fresh Sublime install with this one should install all packages and replicate any other settings you have.

复制此文件夹并用此文件夹替换全新 Sublime 安装中的 Sublime Text 3 文件夹,应该会安装所有软件包并复制您拥有的任何其他设置。