Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As noted by NSSplendid, they're stored in <code>~/Library/Developer/Xcode/UserData/CodeSnippets/</code>.</p> <p>You can use Dropbox to sync them; I use this technique to synchronize my key bindings and archives between computers.</p> <p>Follow these steps:</p> <ol> <li>Quit Xcode.</li> <li>Move your CodeSnippets directory to your Dropbox. For example, let's say you moved them to <code>~/Dropbox/CodeSnippets</code></li> <li>Let Dropbox upload them.</li> <li>Pause Dropbox's syncing.</li> <li>Move them back to where Xcode stores them.</li> <li>Create a symbolic link into Dropbox: <code>ln -s ~/Library/Developer/Xcode/UserData/CodeSnippets ~/Dropbox/CodeSnippets</code>.</li> <li>Resume Dropbox syncing.</li> <li>Relaunch Xcode.</li> </ol> <p>On your other computer:</p> <ol> <li>Quit Xcode.</li> <li>Let Dropbox download everything, if it hasn't yet.</li> <li>Pause Dropbox syncing.</li> <li>Remove your local Xcode user data: <code>rm -R ~/Library/Developer/Xcode/UserData/CodeSnippets</code>.</li> <li>Move your UserData from Dropbox to Xcode: <code>mv ~/Dropbox/CodeSnippets ~/Library/Developer/Xcode/UserData/CodeSnippets</code>.</li> <li>Create a symbolic link from your UserData to DropBox: <code>ln -s ~/Library/Developer/Xcode/UserData/CodeSnippets ~/Dropbox/CodeSnippets</code>.</li> <li>Resume Dropbox syncing.</li> <li>Relaunch Xcode.</li> </ol> <p>The convolutions are necessary because Xcode will not follow a symlink, but Dropbox will. Dropbox will treat that symlink exactly as if the directory was actually there.</p> <p>This is not perfect; you will probably have to quit Xcode to have it recognize new snippets.</p> <p>I sync my entire UserData directory, which gets me synchronized key bindings, named tabs, font &amp; color schemes and code snippets. To do this, move and ln ~/Library/Developer/Xcode/UserData instead. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload