Skip to content

Instantly share code, notes, and snippets.

@funkyremi
Forked from joeshub/ST3-with-iCloud-Drive.sh
Created June 19, 2017 21:10
Show Gist options
  • Save funkyremi/03d56f90b7fd524325cbb7a29b12cb5b to your computer and use it in GitHub Desktop.
Save funkyremi/03d56f90b7fd524325cbb7a29b12cb5b to your computer and use it in GitHub Desktop.
Sync your Sublime Text 3 Settings using iCloud Drive on multiple Macs
# Notes
# Using iCloud Drive, you can sync your Sublime Text 3
# plugins and prefs so you can always have the same setup
# Prerequisites
# Make sure both machines have the latest version of OSX 10.10.x with
# Yosemite or higher and iCloud Drive turned on
# Quit ST3
# Pick a machine with ST3 that has the latest setup you want to start with
# Run step 1 and wait for your iCloud files to sync across the network
# Run step 2 on other machine(s) to duplicate the same settings
# Open up ST3 on the new machines and wait while ST3 updates your packages
# If you're using any system wide packages on the host machine
# (e.g. those installed via npm i -g) be sure to replicate them on the
# host machine(s) as well
# If your ST3 doesn't have Package Control make sure to install it
# https://packagecontrol.io/installation
# Step 1) run this on the host mac that has the latest ST3 settings & packages
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
mkdir -p ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/WebDev/ST3/Plugins
mv User ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/WebDev/ST3/Plugins
ln -s ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/WebDev/ST3/Plugins/User
# Optional backup the User folder on the agent mac before wiping it out
cp -R ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User ~/User
# Steps 2) run this on your agent machine(s) you want mirroring the mac from step 1
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
rm -rf User
ln -s ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/WebDev/ST3/Plugins/User
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment