Bunn / Xgist

Xcode extension to send code to GitHub's Gist
MIT License
77 stars 5 forks source link

[Brainstorm] Create snippets from gist #9

Open Bunn opened 7 years ago

Bunn commented 7 years ago

Xcode save the snippets on this path ~/Library/Developer/Xcode/UserData/CodeSnippets

And this is a snippet file format:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>IDECodeSnippetCompletionScopes</key>
    <array>
        <string>CodeBlock</string>
    </array>
    <key>IDECodeSnippetContents</key>
    <string>       //CODE GOES HERE
</string>
    <key>IDECodeSnippetIdentifier</key>
    <string>5B59E4B8-2705-48CF-8104-F2EF4C6F7EE4</string>
    <key>IDECodeSnippetLanguage</key>
    <string>Xcode.SourceCodeLanguage.Objective-C</string>
    <key>IDECodeSnippetTitle</key>
    <string>SPIPPET_TITLE</string>
    <key>IDECodeSnippetUserSnippet</key>
    <true/>
    <key>IDECodeSnippetVersion</key>
    <integer>0</integer>
</dict>
</plist>

The app could have a way for the user to select gists from an UI or maybe having some special "tag" on the gists to list as snippets.