Skip to content

Instantly share code, notes, and snippets.

@kirb
Last active March 29, 2016 12:14
Show Gist options
  • Save kirb/6322391 to your computer and use it in GitHub Desktop.
Save kirb/6322391 to your computer and use it in GitHub Desktop.
SublimeClang user preferences json for iOS + theos
  1. Install SublimeClang with Package Control if you don't already have it (you do also need to install Package Control first)
  2. Click Sublime Text -> Preferences -> Sublime Clang -> User
  3. Paste in the contents of SublimeClang.sublime-settings, modifying the location of theos (-I/opt/theos/include) and the SDK (/Applications/Xcode.app/Contents/...etc) if needed
  4. Save, restart Sublime, be happy (or yell at me if it didn't work)

(This was just written from memory so let me know if something is wrong. Note that logos syntax is not supported as SublimeClang expects to only be running clang --analyze, and I know nothing about python.)

{
"analyzer_commandline": [
"/usr/bin/xcrun",
"-sdk", "iphoneos",
"clang++",
"--analyze",
"-o",
"-"
],
"options": [
"-x",
"objective-c++",
"-c",
"-DTARGET_IPHONE=1",
"-O2",
"-I/opt/theos/include",
"-include", "/opt/theos/Prefix.pch",
"-Wall",
"-Werror",
"-isysroot", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk",
"-arch", "armv7",
"-D__IPHONE_OS_VERSION_MIN_REQUIRED=__IPHONE_4_3",
"-miphoneos-version-min=4.3"
],
"analyzer_extensions": [
"cpp",
"c",
"cc",
"m",
"mm",
"x",
"xi",
"xm",
"xmi"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment