├── Cocoa Plug-ins ├── Capitalize │ ├── Capitalize.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── james.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ ├── stevenf.pbxuser │ │ ├── stevenf.perspective │ │ ├── will.pbxuser │ │ ├── will.perspectivev3 │ │ └── xcuserdata │ │ │ └── james.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── Capitalize.xcscheme │ │ │ └── xcschememanagement.plist │ ├── CapitalizePlugIn.h │ ├── CapitalizePlugIn.m │ ├── Capitalize_Prefix.pch │ ├── English.lproj │ │ └── InfoPlist.strings │ └── Info.plist ├── CodaPlugInsController.h ├── PHP Validator │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── Info.plist │ ├── PHP Validator.xcodeproj │ │ ├── ian.mode1v3 │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── will.xcuserdatad │ │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ │ └── WorkspaceSettings.xcsettings │ │ ├── stevenf.perspective │ │ ├── xcshareddata │ │ │ └── xcschemes │ │ │ │ └── PHP Validator.xcscheme │ │ └── xcuserdata │ │ │ └── will.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints.xcbkptlist │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ ├── PHPValidatorPlugIn.h │ ├── PHPValidatorPlugIn.m │ └── PHPValidator_Prefix.pch ├── README.md ├── WriteUTFBOM │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── Info.plist │ ├── WriteUTFBOM.xcodeproj │ │ ├── ian.mode1v3 │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── stevenf.perspective │ ├── WriteUTFBOMPlugIn.h │ ├── WriteUTFBOMPlugIn.m │ └── WriteUTFBOM_Prefix.pch ├── Zap Gremlins Sidebar │ ├── English.lproj │ │ ├── InfoPlist.strings │ │ ├── Localizable.strings │ │ └── ZapDialog.nib │ │ │ ├── designable.nib │ │ │ └── keyedobjects.nib │ ├── Info.plist │ ├── Zap Gremlins.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ ├── wade.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ │ │ └── will.xcuserdatad │ │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── wade.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── Zap Gremlins.xcscheme │ │ │ └── xcschememanagement.plist │ ├── Zap Gremlins_Prefix.pch │ ├── ZapPlugIn.h │ ├── ZapPlugIn.m │ ├── ZapPlugInViewController.h │ ├── ZapPlugInViewController.m │ └── gizmo.pdf └── Zap Gremlins │ ├── English.lproj │ ├── Localizable.strings │ └── ZapDialog.nib │ │ ├── designable.nib │ │ └── keyedobjects.nib │ ├── Info.plist │ ├── Zap Gremlins.xcodeproj │ ├── TemplateIcon.icns │ ├── project.pbxproj │ ├── will.pbxuser │ └── will.perspectivev3 │ ├── Zap Gremlins_Prefix.pch │ ├── ZapPlugIn.h │ └── ZapPlugIn.m ├── Color Themes ├── Panic Palette.sss └── README.md ├── Completions ├── Simple.codacompletion │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── Additions.plist ├── WordPress 3.7.1 Additions.codacompletion │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── Additions.plist └── jQuery 1.10.2 Additions.codacompletion │ └── Contents │ ├── Info.plist │ └── Resources │ └── Additions.plist ├── README.md ├── Script Plug-ins ├── Capitalization.codaplugin │ └── Contents │ │ ├── Info.plist │ │ ├── MacOS │ │ └── CodaScriptPlugIn │ │ └── Resources │ │ ├── 14B10CED-C7A2-4014-898F-6CE1CD81B857 │ │ └── uppercase.php │ │ ├── 9AD79B6A-7D8B-4313-A1F6-73EA2E515531 │ │ └── lowercase.php │ │ ├── English.lproj │ │ └── Localizable.strings │ │ └── Japanese.lproj │ │ └── Localizable.strings ├── Print Env.codaplugin │ └── Contents │ │ ├── Info.plist │ │ ├── MacOS │ │ └── CodaScriptPlugIn │ │ └── Resources │ │ ├── 4ABE9341-B4C0-42A4-A758-7944E48C14B6 │ │ └── print_env.pl │ │ ├── English.lproj │ │ └── Localizable.strings │ │ └── Japanese.lproj │ │ └── Localizable.strings ├── README.md ├── Text.codaplugin │ └── Contents │ │ ├── Info.plist │ │ ├── MacOS │ │ └── CodaScriptPlugIn │ │ └── Resources │ │ ├── 1B2F309E-50B0-42CD-859A-87581AAEE6A6 │ │ └── joinlines.php │ │ ├── 36303DDD-B548-4E20-8C11-6328568961FF │ │ └── striptags.php │ │ ├── 4D913BBD-6102-4042-92BB-BB1E0D94AD7A │ │ └── converttotag.php │ │ ├── 64CB269F-1EA6-43EB-AB0D-46BA1D780F46 │ │ └── insertdate.php │ │ ├── 7120D3E4-4D47-4379-85D7-7D7A60CE705F │ │ └── length.php │ │ ├── 891FE431-ACB7-4B7E-B59E-18A6017FF2E4 │ │ └── inserttime.php │ │ ├── English.lproj │ │ └── Localizable.strings │ │ └── Japanese.lproj │ │ └── Localizable.strings └── Wrap With Tag.codaplugin │ └── Contents │ ├── Info.plist │ ├── MacOS │ └── CodaScriptPlugIn │ └── Resources │ ├── 02429196-ED06-40C3-A82F-D85876536D89 │ └── link.php │ ├── 08FD46B0-8E43-4D72-AA9B-2EF9F285F8C0 │ └── underline.php │ ├── 51AE6B04-3670-43DA-AAD0-A8DFC431F604 │ └── strike.php │ ├── 59479047-133C-471C-91FD-C71C58176B0C │ └── italic.php │ ├── 7AC1DF3F-A911-49E7-8A46-C2B415F7D62C │ └── bold.php │ ├── 812D57E6-7534-4112-92AF-0D3807234B01 │ └── div.php │ ├── DC5A2C55-3AA2-4C17-8CF8-E0A862BE4373 │ └── span.php │ ├── English.lproj │ └── Localizable.strings │ ├── F4381209-A9EC-4EDB-9CF7-D8BCEB332B51 │ └── paragraph.php │ └── Japanese.lproj │ └── Localizable.strings ├── Syntax Modes ├── README.md └── XML.mode │ └── Contents │ ├── Info.plist │ └── Resources │ ├── ChangeLog.txt │ ├── CodaCompletion.plist │ ├── English.lproj │ ├── ExampleSyntax.txt │ ├── InfoPlist.strings │ ├── Localizable.strings │ └── ScopeExamples.plist │ ├── French.lproj │ ├── ExampleSyntax.txt │ ├── InfoPlist.strings │ ├── Localizable.strings │ └── ScopeExamples.plist │ ├── German.lproj │ ├── ExampleSyntax.txt │ ├── InfoPlist.strings │ ├── Localizable.strings │ └── ScopeExamples.plist │ ├── ModeSettings.xml │ ├── RegexSymbols.xml │ ├── Scripts │ ├── 10-CloseLastTag.scpt │ ├── 20-CheckWellFormedness.scpt │ ├── 30-Validate.scpt │ ├── 50-TransformWithXSLT.scpt │ ├── Comment Selection.scpt │ ├── Insert HTML Color.scpt │ └── shell │ │ └── closetag.pl │ ├── StyleIDTransition.plist │ ├── Symbol!.png │ ├── Symbol!.tif │ ├── SymbolID.png │ ├── SymbolID.tif │ └── SyntaxDefinition.xml └── Webscript Sidebar plugins ├── Hello World.codawebscriptsidebar ├── Info.plist ├── html5-logo.pdf ├── index.html └── web-trifecta.png └── README.md /Cocoa Plug-ins/Capitalize/Capitalize.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 42; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; 11 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; 12 | F163D8F50C67D694000A99F5 /* CapitalizePlugIn.m in Sources */ = {isa = PBXBuildFile; fileRef = F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */; }; 13 | /* End PBXBuildFile section */ 14 | 15 | /* Begin PBXFileReference section */ 16 | 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 17 | 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 18 | 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 19 | 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 20 | 32DBCF630370AF2F00C91783 /* Capitalize_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Capitalize_Prefix.pch; sourceTree = ""; }; 21 | 3CD092330E8D7C9200D61EFB /* CodaPlugInsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodaPlugInsController.h; path = ../CodaPlugInsController.h; sourceTree = SOURCE_ROOT; }; 22 | 8D5B49B6048680CD000E48DA /* Capitalize.codaplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Capitalize.codaplugin; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 24 | D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 25 | F163D8F30C67D694000A99F5 /* CapitalizePlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CapitalizePlugIn.h; sourceTree = ""; }; 26 | F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CapitalizePlugIn.m; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | 8D5B49B3048680CD000E48DA /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */, 35 | ); 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXFrameworksBuildPhase section */ 39 | 40 | /* Begin PBXGroup section */ 41 | 089C166AFE841209C02AAC07 /* Capitalize */ = { 42 | isa = PBXGroup; 43 | children = ( 44 | 08FB77AFFE84173DC02AAC07 /* Classes */, 45 | 32C88E010371C26100C91783 /* Other Sources */, 46 | 089C167CFE841241C02AAC07 /* Resources */, 47 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, 48 | 19C28FB8FE9D52D311CA2CBB /* Products */, 49 | ); 50 | name = Capitalize; 51 | sourceTree = ""; 52 | }; 53 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */, 57 | 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */, 58 | ); 59 | name = "Frameworks and Libraries"; 60 | sourceTree = ""; 61 | }; 62 | 089C167CFE841241C02AAC07 /* Resources */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 8D5B49B7048680CD000E48DA /* Info.plist */, 66 | 089C167DFE841241C02AAC07 /* InfoPlist.strings */, 67 | ); 68 | name = Resources; 69 | sourceTree = ""; 70 | }; 71 | 08FB77AFFE84173DC02AAC07 /* Classes */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 3CD092330E8D7C9200D61EFB /* CodaPlugInsController.h */, 75 | F163D8F30C67D694000A99F5 /* CapitalizePlugIn.h */, 76 | F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */, 77 | ); 78 | name = Classes; 79 | sourceTree = ""; 80 | }; 81 | 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */, 85 | ); 86 | name = "Linked Frameworks"; 87 | sourceTree = ""; 88 | }; 89 | 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 089C167FFE841241C02AAC07 /* AppKit.framework */, 93 | D2F7E65807B2D6F200F64583 /* CoreData.framework */, 94 | 089C1672FE841209C02AAC07 /* Foundation.framework */, 95 | ); 96 | name = "Other Frameworks"; 97 | sourceTree = ""; 98 | }; 99 | 19C28FB8FE9D52D311CA2CBB /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 8D5B49B6048680CD000E48DA /* Capitalize.codaplugin */, 103 | ); 104 | name = Products; 105 | sourceTree = ""; 106 | }; 107 | 32C88E010371C26100C91783 /* Other Sources */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 32DBCF630370AF2F00C91783 /* Capitalize_Prefix.pch */, 111 | ); 112 | name = "Other Sources"; 113 | sourceTree = ""; 114 | }; 115 | /* End PBXGroup section */ 116 | 117 | /* Begin PBXNativeTarget section */ 118 | 8D5B49AC048680CD000E48DA /* Capitalize */ = { 119 | isa = PBXNativeTarget; 120 | buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "Capitalize" */; 121 | buildPhases = ( 122 | 8D5B49AF048680CD000E48DA /* Resources */, 123 | 8D5B49B1048680CD000E48DA /* Sources */, 124 | 8D5B49B3048680CD000E48DA /* Frameworks */, 125 | ); 126 | buildRules = ( 127 | ); 128 | dependencies = ( 129 | ); 130 | name = Capitalize; 131 | productInstallPath = "$(HOME)/Library/Bundles"; 132 | productName = Capitalize; 133 | productReference = 8D5B49B6048680CD000E48DA /* Capitalize.codaplugin */; 134 | productType = "com.apple.product-type.bundle"; 135 | }; 136 | /* End PBXNativeTarget section */ 137 | 138 | /* Begin PBXProject section */ 139 | 089C1669FE841209C02AAC07 /* Project object */ = { 140 | isa = PBXProject; 141 | attributes = { 142 | }; 143 | buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "Capitalize" */; 144 | compatibilityVersion = "Xcode 2.4"; 145 | developmentRegion = English; 146 | hasScannedForEncodings = 1; 147 | knownRegions = ( 148 | en, 149 | ); 150 | mainGroup = 089C166AFE841209C02AAC07 /* Capitalize */; 151 | projectDirPath = ""; 152 | projectRoot = ""; 153 | targets = ( 154 | 8D5B49AC048680CD000E48DA /* Capitalize */, 155 | ); 156 | }; 157 | /* End PBXProject section */ 158 | 159 | /* Begin PBXResourcesBuildPhase section */ 160 | 8D5B49AF048680CD000E48DA /* Resources */ = { 161 | isa = PBXResourcesBuildPhase; 162 | buildActionMask = 2147483647; 163 | files = ( 164 | 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */, 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | /* End PBXResourcesBuildPhase section */ 169 | 170 | /* Begin PBXSourcesBuildPhase section */ 171 | 8D5B49B1048680CD000E48DA /* Sources */ = { 172 | isa = PBXSourcesBuildPhase; 173 | buildActionMask = 2147483647; 174 | files = ( 175 | F163D8F50C67D694000A99F5 /* CapitalizePlugIn.m in Sources */, 176 | ); 177 | runOnlyForDeploymentPostprocessing = 0; 178 | }; 179 | /* End PBXSourcesBuildPhase section */ 180 | 181 | /* Begin PBXVariantGroup section */ 182 | 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { 183 | isa = PBXVariantGroup; 184 | children = ( 185 | 089C167EFE841241C02AAC07 /* English */, 186 | ); 187 | name = InfoPlist.strings; 188 | sourceTree = ""; 189 | }; 190 | /* End PBXVariantGroup section */ 191 | 192 | /* Begin XCBuildConfiguration section */ 193 | 1DEB913B08733D840010E9CD /* Debug */ = { 194 | isa = XCBuildConfiguration; 195 | buildSettings = { 196 | COPY_PHASE_STRIP = NO; 197 | DEPLOYMENT_LOCATION = NO; 198 | DSTROOT = "$(HOME)/Library/Application Support/Coda/PlugIns"; 199 | GCC_DYNAMIC_NO_PIC = NO; 200 | GCC_ENABLE_FIX_AND_CONTINUE = YES; 201 | GCC_OPTIMIZATION_LEVEL = 0; 202 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 203 | GCC_PREFIX_HEADER = Capitalize_Prefix.pch; 204 | INFOPLIST_FILE = Info.plist; 205 | INSTALL_PATH = ""; 206 | PRODUCT_NAME = Capitalize; 207 | SKIP_INSTALL = NO; 208 | WRAPPER_EXTENSION = codaplugin; 209 | }; 210 | name = Debug; 211 | }; 212 | 1DEB913C08733D840010E9CD /* Release */ = { 213 | isa = XCBuildConfiguration; 214 | buildSettings = { 215 | DEPLOYMENT_LOCATION = NO; 216 | DSTROOT = "$(HOME)/Library/Application Support/Coda/PlugIns"; 217 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 218 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 219 | GCC_PREFIX_HEADER = Capitalize_Prefix.pch; 220 | INFOPLIST_FILE = Info.plist; 221 | INSTALL_PATH = ""; 222 | PRODUCT_NAME = Capitalize; 223 | SKIP_INSTALL = NO; 224 | WRAPPER_EXTENSION = codaplugin; 225 | }; 226 | name = Release; 227 | }; 228 | 1DEB913F08733D840010E9CD /* Debug */ = { 229 | isa = XCBuildConfiguration; 230 | buildSettings = { 231 | ARCHS = "$(NATIVE_ARCH_ACTUAL)"; 232 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 233 | GCC_WARN_UNUSED_VARIABLE = YES; 234 | PREBINDING = NO; 235 | SDKROOT = macosx; 236 | }; 237 | name = Debug; 238 | }; 239 | 1DEB914008733D840010E9CD /* Release */ = { 240 | isa = XCBuildConfiguration; 241 | buildSettings = { 242 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; 243 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 244 | GCC_WARN_UNUSED_VARIABLE = YES; 245 | PREBINDING = NO; 246 | SDKROOT = macosx; 247 | }; 248 | name = Release; 249 | }; 250 | /* End XCBuildConfiguration section */ 251 | 252 | /* Begin XCConfigurationList section */ 253 | 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "Capitalize" */ = { 254 | isa = XCConfigurationList; 255 | buildConfigurations = ( 256 | 1DEB913B08733D840010E9CD /* Debug */, 257 | 1DEB913C08733D840010E9CD /* Release */, 258 | ); 259 | defaultConfigurationIsVisible = 0; 260 | defaultConfigurationName = Release; 261 | }; 262 | 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "Capitalize" */ = { 263 | isa = XCConfigurationList; 264 | buildConfigurations = ( 265 | 1DEB913F08733D840010E9CD /* Debug */, 266 | 1DEB914008733D840010E9CD /* Release */, 267 | ); 268 | defaultConfigurationIsVisible = 0; 269 | defaultConfigurationName = Release; 270 | }; 271 | /* End XCConfigurationList section */ 272 | }; 273 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 274 | } 275 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/Capitalize.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/Capitalize.xcodeproj/project.xcworkspace/xcuserdata/james.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Capitalize/Capitalize.xcodeproj/project.xcworkspace/xcuserdata/james.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/Capitalize.xcodeproj/stevenf.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 089C1669FE841209C02AAC07 /* Project object */ = { 4 | activeBuildConfigurationName = Debug; 5 | activeTarget = 8D5B49AC048680CD000E48DA /* Capitalize */; 6 | addToTargets = ( 7 | 8D5B49AC048680CD000E48DA /* Capitalize */, 8 | ); 9 | breakpoints = ( 10 | ); 11 | codeSenseManager = F163D8EA0C67D640000A99F5 /* Code sense */; 12 | perUserDictionary = { 13 | PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { 14 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 15 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 16 | PBXFileTableDataSourceColumnWidthsKey = ( 17 | 20, 18 | 677, 19 | 20, 20 | 48, 21 | 43, 22 | 43, 23 | 20, 24 | ); 25 | PBXFileTableDataSourceColumnsKey = ( 26 | PBXFileDataSource_FiletypeID, 27 | PBXFileDataSource_Filename_ColumnID, 28 | PBXFileDataSource_Built_ColumnID, 29 | PBXFileDataSource_ObjectSize_ColumnID, 30 | PBXFileDataSource_Errors_ColumnID, 31 | PBXFileDataSource_Warnings_ColumnID, 32 | PBXFileDataSource_Target_ColumnID, 33 | ); 34 | }; 35 | PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { 36 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 37 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 38 | PBXFileTableDataSourceColumnWidthsKey = ( 39 | 20, 40 | 200, 41 | 323, 42 | 20, 43 | 48, 44 | 43, 45 | 43, 46 | ); 47 | PBXFileTableDataSourceColumnsKey = ( 48 | PBXFileDataSource_FiletypeID, 49 | PBXFileDataSource_Filename_ColumnID, 50 | PBXTargetDataSource_PrimaryAttribute, 51 | PBXFileDataSource_Built_ColumnID, 52 | PBXFileDataSource_ObjectSize_ColumnID, 53 | PBXFileDataSource_Errors_ColumnID, 54 | PBXFileDataSource_Warnings_ColumnID, 55 | ); 56 | }; 57 | PBXPerProjectTemplateStateSaveDate = 243973713; 58 | PBXWorkspaceStateSaveDate = 243973713; 59 | }; 60 | perUserProjectItems = { 61 | F163D8FA0C67D6D6000A99F5 /* PBXTextBookmark */ = F163D8FA0C67D6D6000A99F5 /* PBXTextBookmark */; 62 | F163D8FB0C67D6D6000A99F5 /* PBXTextBookmark */ = F163D8FB0C67D6D6000A99F5 /* PBXTextBookmark */; 63 | F163D8FE0C67D6D6000A99F5 /* PBXTextBookmark */ = F163D8FE0C67D6D6000A99F5 /* PBXTextBookmark */; 64 | F163D8FF0C67D6D6000A99F5 /* PBXTextBookmark */ = F163D8FF0C67D6D6000A99F5 /* PBXTextBookmark */; 65 | F1739C020E842186000C4005 /* PBXTextBookmark */ = F1739C020E842186000C4005 /* PBXTextBookmark */; 66 | F1739C050E842186000C4005 /* PBXTextBookmark */ = F1739C050E842186000C4005 /* PBXTextBookmark */; 67 | F19699670E8ABE600082813B /* PBXTextBookmark */ = F19699670E8ABE600082813B /* PBXTextBookmark */; 68 | F19699680E8ABE600082813B /* PBXTextBookmark */ = F19699680E8ABE600082813B /* PBXTextBookmark */; 69 | F19699690E8ABE600082813B /* PBXTextBookmark */ = F19699690E8ABE600082813B /* PBXTextBookmark */; 70 | F196996A0E8ABE600082813B /* PBXTextBookmark */ = F196996A0E8ABE600082813B /* PBXTextBookmark */; 71 | F196996B0E8ABE600082813B /* PBXTextBookmark */ = F196996B0E8ABE600082813B /* PBXTextBookmark */; 72 | }; 73 | sourceControlManager = F163D8E90C67D640000A99F5 /* Source Control */; 74 | userBuildSettings = { 75 | }; 76 | }; 77 | 089C167EFE841241C02AAC07 /* English */ = { 78 | uiCtxt = { 79 | sepNavIntBoundsRect = "{{0, 0}, {701, 1049}}"; 80 | sepNavSelRange = "{90, 0}"; 81 | sepNavVisRect = "{{0, 0}, {701, 1049}}"; 82 | }; 83 | }; 84 | 8D5B49AC048680CD000E48DA /* Capitalize */ = { 85 | activeExec = 0; 86 | }; 87 | 8D5B49B7048680CD000E48DA /* Info.plist */ = { 88 | uiCtxt = { 89 | sepNavIntBoundsRect = "{{0, 0}, {701, 1049}}"; 90 | sepNavSelRange = "{484, 0}"; 91 | sepNavVisRect = "{{0, 0}, {701, 1049}}"; 92 | }; 93 | }; 94 | F163D8E90C67D640000A99F5 /* Source Control */ = { 95 | isa = PBXSourceControlManager; 96 | fallbackIsa = XCSourceControlManager; 97 | isSCMEnabled = 0; 98 | scmConfiguration = { 99 | }; 100 | scmType = ""; 101 | }; 102 | F163D8EA0C67D640000A99F5 /* Code sense */ = { 103 | isa = PBXCodeSenseManager; 104 | indexTemplatePath = ""; 105 | }; 106 | F163D8F30C67D694000A99F5 /* CapitalizePlugIn.h */ = { 107 | uiCtxt = { 108 | sepNavIntBoundsRect = "{{0, 0}, {904, 869}}"; 109 | sepNavSelRange = "{210, 0}"; 110 | sepNavVisRange = "{0, 210}"; 111 | sepNavVisRect = "{{0, 0}, {924, 854}}"; 112 | }; 113 | }; 114 | F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */ = { 115 | uiCtxt = { 116 | sepNavIntBoundsRect = "{{0, 0}, {904, 869}}"; 117 | sepNavSelRange = "{237, 132}"; 118 | sepNavVisRange = "{0, 1223}"; 119 | sepNavVisRect = "{{0, 0}, {924, 854}}"; 120 | }; 121 | }; 122 | F163D8FA0C67D6D6000A99F5 /* PBXTextBookmark */ = { 123 | isa = PBXTextBookmark; 124 | fRef = 089C167EFE841241C02AAC07 /* English */; 125 | name = "English: 3"; 126 | rLen = 0; 127 | rLoc = 90; 128 | rType = 0; 129 | vrLen = 104; 130 | vrLoc = 0; 131 | }; 132 | F163D8FB0C67D6D6000A99F5 /* PBXTextBookmark */ = { 133 | isa = PBXTextBookmark; 134 | fRef = 8D5B49B7048680CD000E48DA /* Info.plist */; 135 | name = "Info.plist: 24"; 136 | rLen = 0; 137 | rLoc = 770; 138 | rType = 0; 139 | vrLen = 797; 140 | vrLoc = 0; 141 | }; 142 | F163D8FE0C67D6D6000A99F5 /* PBXTextBookmark */ = { 143 | isa = PBXTextBookmark; 144 | fRef = 8D5B49B7048680CD000E48DA /* Info.plist */; 145 | name = "Info.plist: 14"; 146 | rLen = 0; 147 | rLoc = 484; 148 | rType = 0; 149 | vrLen = 781; 150 | vrLoc = 0; 151 | }; 152 | F163D8FF0C67D6D6000A99F5 /* PBXTextBookmark */ = { 153 | isa = PBXTextBookmark; 154 | fRef = 089C167EFE841241C02AAC07 /* English */; 155 | name = "English: 3"; 156 | rLen = 0; 157 | rLoc = 90; 158 | rType = 0; 159 | vrLen = 104; 160 | vrLoc = 0; 161 | }; 162 | F163D9860C67D8C8000A99F5 /* CodaPlugInsController.h */ = { 163 | uiCtxt = { 164 | sepNavIntBoundsRect = "{{0, 0}, {904, 1469}}"; 165 | sepNavSelRange = "{0, 0}"; 166 | sepNavVisRange = "{0, 1550}"; 167 | sepNavVisRect = "{{0, 0}, {924, 854}}"; 168 | }; 169 | }; 170 | F1739C020E842186000C4005 /* PBXTextBookmark */ = { 171 | isa = PBXTextBookmark; 172 | fRef = F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */; 173 | name = "CapitalizePlugIn.m: 1"; 174 | rLen = 1223; 175 | rLoc = 0; 176 | rType = 0; 177 | vrLen = 1223; 178 | vrLoc = 0; 179 | }; 180 | F1739C050E842186000C4005 /* PBXTextBookmark */ = { 181 | isa = PBXTextBookmark; 182 | fRef = F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */; 183 | name = "CapitalizePlugIn.m: 1"; 184 | rLen = 1223; 185 | rLoc = 0; 186 | rType = 0; 187 | vrLen = 1223; 188 | vrLoc = 0; 189 | }; 190 | F19699670E8ABE600082813B /* PBXTextBookmark */ = { 191 | isa = PBXTextBookmark; 192 | fRef = F163D8F30C67D694000A99F5 /* CapitalizePlugIn.h */; 193 | name = "CapitalizePlugIn.h: 13"; 194 | rLen = 0; 195 | rLoc = 210; 196 | rType = 0; 197 | vrLen = 210; 198 | vrLoc = 0; 199 | }; 200 | F19699680E8ABE600082813B /* PBXTextBookmark */ = { 201 | isa = PBXTextBookmark; 202 | fRef = F163D9860C67D8C8000A99F5 /* CodaPlugInsController.h */; 203 | name = "CodaPlugInsController.h: 1"; 204 | rLen = 0; 205 | rLoc = 0; 206 | rType = 0; 207 | vrLen = 1550; 208 | vrLoc = 0; 209 | }; 210 | F19699690E8ABE600082813B /* PBXTextBookmark */ = { 211 | isa = PBXTextBookmark; 212 | fRef = F163D8F30C67D694000A99F5 /* CapitalizePlugIn.h */; 213 | name = "CapitalizePlugIn.h: 13"; 214 | rLen = 0; 215 | rLoc = 210; 216 | rType = 0; 217 | vrLen = 210; 218 | vrLoc = 0; 219 | }; 220 | F196996A0E8ABE600082813B /* PBXTextBookmark */ = { 221 | isa = PBXTextBookmark; 222 | fRef = F163D9860C67D8C8000A99F5 /* CodaPlugInsController.h */; 223 | name = "CodaPlugInsController.h: 1"; 224 | rLen = 0; 225 | rLoc = 0; 226 | rType = 0; 227 | vrLen = 1550; 228 | vrLoc = 0; 229 | }; 230 | F196996B0E8ABE600082813B /* PBXTextBookmark */ = { 231 | isa = PBXTextBookmark; 232 | fRef = F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */; 233 | name = "CapitalizePlugIn.m: 11"; 234 | rLen = 132; 235 | rLoc = 237; 236 | rType = 0; 237 | vrLen = 1223; 238 | vrLoc = 0; 239 | }; 240 | } 241 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/Capitalize.xcodeproj/will.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 089C1669FE841209C02AAC07 /* Project object */ = { 4 | activeBuildConfigurationName = Release; 5 | activeTarget = 8D5B49AC048680CD000E48DA /* Capitalize */; 6 | codeSenseManager = BECAD84A0CD2923600620229 /* Code sense */; 7 | perUserDictionary = { 8 | PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { 9 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 10 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 11 | PBXFileTableDataSourceColumnWidthsKey = ( 12 | 20, 13 | 738, 14 | 20, 15 | 48, 16 | 43, 17 | 43, 18 | 20, 19 | ); 20 | PBXFileTableDataSourceColumnsKey = ( 21 | PBXFileDataSource_FiletypeID, 22 | PBXFileDataSource_Filename_ColumnID, 23 | PBXFileDataSource_Built_ColumnID, 24 | PBXFileDataSource_ObjectSize_ColumnID, 25 | PBXFileDataSource_Errors_ColumnID, 26 | PBXFileDataSource_Warnings_ColumnID, 27 | PBXFileDataSource_Target_ColumnID, 28 | ); 29 | }; 30 | PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { 31 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 32 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 33 | PBXFileTableDataSourceColumnWidthsKey = ( 34 | 20, 35 | 433, 36 | 60, 37 | 20, 38 | 48, 39 | 43, 40 | 43, 41 | ); 42 | PBXFileTableDataSourceColumnsKey = ( 43 | PBXFileDataSource_FiletypeID, 44 | PBXFileDataSource_Filename_ColumnID, 45 | PBXTargetDataSource_PrimaryAttribute, 46 | PBXFileDataSource_Built_ColumnID, 47 | PBXFileDataSource_ObjectSize_ColumnID, 48 | PBXFileDataSource_Errors_ColumnID, 49 | PBXFileDataSource_Warnings_ColumnID, 50 | ); 51 | }; 52 | PBXPerProjectTemplateStateSaveDate = 247015242; 53 | PBXWorkspaceStateSaveDate = 247015242; 54 | }; 55 | perUserProjectItems = { 56 | BEAA0D590EB0F712002630D0 /* PBXTextBookmark */ = BEAA0D590EB0F712002630D0 /* PBXTextBookmark */; 57 | BEAA0D5B0EB0F712002630D0 /* PBXTextBookmark */ = BEAA0D5B0EB0F712002630D0 /* PBXTextBookmark */; 58 | BEAA0D5C0EB0F712002630D0 /* PBXTextBookmark */ = BEAA0D5C0EB0F712002630D0 /* PBXTextBookmark */; 59 | BEAA0D820EB0F891002630D0 /* PBXTextBookmark */ = BEAA0D820EB0F891002630D0 /* PBXTextBookmark */; 60 | BEAA0D840EB0F891002630D0 /* PBXTextBookmark */ = BEAA0D840EB0F891002630D0 /* PBXTextBookmark */; 61 | BEAA0E170EB101A6002630D0 /* PlistBookmark */ = BEAA0E170EB101A6002630D0 /* PlistBookmark */; 62 | BEAA0E190EB101A6002630D0 /* PlistBookmark */ = BEAA0E190EB101A6002630D0 /* PlistBookmark */; 63 | BEAA0E1A0EB101A6002630D0 /* PBXTextBookmark */ = BEAA0E1A0EB101A6002630D0 /* PBXTextBookmark */; 64 | BEAA0EB90EB119BE002630D0 /* PBXTextBookmark */ = BEAA0EB90EB119BE002630D0 /* PBXTextBookmark */; 65 | BEAA0EE00EB12108002630D0 /* PBXTextBookmark */ = BEAA0EE00EB12108002630D0 /* PBXTextBookmark */; 66 | BEB287DD0EB927C300B1446F /* PBXTextBookmark */ = BEB287DD0EB927C300B1446F /* PBXTextBookmark */; 67 | }; 68 | sourceControlManager = BECAD8490CD2923600620229 /* Source Control */; 69 | userBuildSettings = { 70 | }; 71 | }; 72 | 089C167EFE841241C02AAC07 /* English */ = { 73 | uiCtxt = { 74 | sepNavIntBoundsRect = "{{0, 0}, {651, 442}}"; 75 | sepNavSelRange = "{45, 59}"; 76 | sepNavVisRange = "{0, 104}"; 77 | sepNavWindowFrame = "{{15, 170}, {1257, 1003}}"; 78 | }; 79 | }; 80 | 3CD092330E8D7C9200D61EFB /* CodaPlugInsController.h */ = { 81 | uiCtxt = { 82 | sepNavIntBoundsRect = "{{0, 0}, {651, 2170}}"; 83 | sepNavSelRange = "{0, 0}"; 84 | sepNavVisRange = "{100, 942}"; 85 | }; 86 | }; 87 | 8D5B49AC048680CD000E48DA /* Capitalize */ = { 88 | activeExec = 0; 89 | }; 90 | BEAA0D590EB0F712002630D0 /* PBXTextBookmark */ = { 91 | isa = PBXTextBookmark; 92 | fRef = 3CD092330E8D7C9200D61EFB /* CodaPlugInsController.h */; 93 | name = "CodaPlugInsController.h: 1"; 94 | rLen = 0; 95 | rLoc = 0; 96 | rType = 0; 97 | vrLen = 942; 98 | vrLoc = 100; 99 | }; 100 | BEAA0D5B0EB0F712002630D0 /* PBXTextBookmark */ = { 101 | isa = PBXTextBookmark; 102 | fRef = 089C167EFE841241C02AAC07 /* English */; 103 | name = "InfoPlist.strings: 3"; 104 | rLen = 59; 105 | rLoc = 45; 106 | rType = 0; 107 | vrLen = 104; 108 | vrLoc = 0; 109 | }; 110 | BEAA0D5C0EB0F712002630D0 /* PBXTextBookmark */ = { 111 | isa = PBXTextBookmark; 112 | fRef = 3CD092330E8D7C9200D61EFB /* CodaPlugInsController.h */; 113 | name = "CodaPlugInsController.h: 1"; 114 | rLen = 0; 115 | rLoc = 0; 116 | rType = 0; 117 | vrLen = 942; 118 | vrLoc = 100; 119 | }; 120 | BEAA0D820EB0F891002630D0 /* PBXTextBookmark */ = { 121 | isa = PBXTextBookmark; 122 | fRef = 089C167EFE841241C02AAC07 /* English */; 123 | name = "InfoPlist.strings: 3"; 124 | rLen = 59; 125 | rLoc = 45; 126 | rType = 0; 127 | vrLen = 104; 128 | vrLoc = 0; 129 | }; 130 | BEAA0D840EB0F891002630D0 /* PBXTextBookmark */ = { 131 | isa = PBXTextBookmark; 132 | fRef = F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */; 133 | name = "CapitalizePlugIn.m: 32"; 134 | rLen = 0; 135 | rLoc = 750; 136 | rType = 0; 137 | vrLen = 574; 138 | vrLoc = 546; 139 | }; 140 | BEAA0E170EB101A6002630D0 /* PlistBookmark */ = { 141 | isa = PlistBookmark; 142 | fRef = 8D5B49B7048680CD000E48DA /* Info.plist */; 143 | fallbackIsa = PBXBookmark; 144 | isK = 0; 145 | kPath = ( 146 | CFBundleIdentifier, 147 | ); 148 | name = /Users/will/Projects/coda/plugins/Capitalize/Info.plist; 149 | rLen = 0; 150 | rLoc = 2147483647; 151 | }; 152 | BEAA0E190EB101A6002630D0 /* PlistBookmark */ = { 153 | isa = PlistBookmark; 154 | fRef = 8D5B49B7048680CD000E48DA /* Info.plist */; 155 | fallbackIsa = PBXBookmark; 156 | isK = 0; 157 | kPath = ( 158 | CFBundleIdentifier, 159 | ); 160 | name = /Users/will/Projects/coda/plugins/Capitalize/Info.plist; 161 | rLen = 0; 162 | rLoc = 2147483647; 163 | }; 164 | BEAA0E1A0EB101A6002630D0 /* PBXTextBookmark */ = { 165 | isa = PBXTextBookmark; 166 | fRef = F163D8F30C67D694000A99F5 /* CapitalizePlugIn.h */; 167 | name = "CapitalizePlugIn.h: 1"; 168 | rLen = 0; 169 | rLoc = 0; 170 | rType = 0; 171 | vrLen = 256; 172 | vrLoc = 0; 173 | }; 174 | BEAA0EB90EB119BE002630D0 /* PBXTextBookmark */ = { 175 | isa = PBXTextBookmark; 176 | fRef = F163D8F30C67D694000A99F5 /* CapitalizePlugIn.h */; 177 | name = "CapitalizePlugIn.h: 1"; 178 | rLen = 0; 179 | rLoc = 0; 180 | rType = 0; 181 | vrLen = 256; 182 | vrLoc = 0; 183 | }; 184 | BEAA0EE00EB12108002630D0 /* PBXTextBookmark */ = { 185 | isa = PBXTextBookmark; 186 | fRef = F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */; 187 | name = "CapitalizePlugIn.m: 52"; 188 | rLen = 0; 189 | rLoc = 1187; 190 | rType = 0; 191 | vrLen = 652; 192 | vrLoc = 571; 193 | }; 194 | BEB287DD0EB927C300B1446F /* PBXTextBookmark */ = { 195 | isa = PBXTextBookmark; 196 | fRef = F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */; 197 | name = "CapitalizePlugIn.m: 25"; 198 | rLen = 0; 199 | rLoc = 632; 200 | rType = 0; 201 | vrLen = 1220; 202 | vrLoc = 29; 203 | }; 204 | BECAD8490CD2923600620229 /* Source Control */ = { 205 | isa = PBXSourceControlManager; 206 | fallbackIsa = XCSourceControlManager; 207 | isSCMEnabled = 0; 208 | scmConfiguration = { 209 | }; 210 | }; 211 | BECAD84A0CD2923600620229 /* Code sense */ = { 212 | isa = PBXCodeSenseManager; 213 | indexTemplatePath = ""; 214 | }; 215 | F163D8F30C67D694000A99F5 /* CapitalizePlugIn.h */ = { 216 | uiCtxt = { 217 | sepNavIntBoundsRect = "{{0, 0}, {651, 442}}"; 218 | sepNavSelRange = "{0, 0}"; 219 | sepNavVisRange = "{0, 256}"; 220 | }; 221 | }; 222 | F163D8F40C67D694000A99F5 /* CapitalizePlugIn.m */ = { 223 | uiCtxt = { 224 | sepNavIntBoundsRect = "{{0, 0}, {916, 812}}"; 225 | sepNavSelRange = "{632, 0}"; 226 | sepNavVisRange = "{29, 1220}"; 227 | }; 228 | }; 229 | } 230 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/Capitalize.xcodeproj/xcuserdata/james.xcuserdatad/xcschemes/Capitalize.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 67 | 68 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/Capitalize.xcodeproj/xcuserdata/james.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Capitalize.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8D5B49AC048680CD000E48DA 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/CapitalizePlugIn.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CodaPluginsController.h" 3 | 4 | @class CodaPlugInsController; 5 | 6 | @interface CapitalizePlugIn : NSObject 7 | { 8 | CodaPlugInsController* controller; 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/CapitalizePlugIn.m: -------------------------------------------------------------------------------- 1 | #import "CapitalizePlugIn.h" 2 | #import "CodaPlugInsController.h" 3 | 4 | @interface CapitalizePlugIn () 5 | 6 | - (id)initWithController:(CodaPlugInsController*)inController; 7 | 8 | @end 9 | 10 | 11 | @implementation CapitalizePlugIn 12 | 13 | //2.0 and lower 14 | - (id)initWithPlugInController:(CodaPlugInsController*)aController bundle:(NSBundle*)aBundle 15 | { 16 | return [self initWithController:aController]; 17 | } 18 | 19 | 20 | //2.0.1 and higher 21 | - (id)initWithPlugInController:(CodaPlugInsController*)aController plugInBundle:(NSObject *)plugInBundle 22 | { 23 | return [self initWithController:aController]; 24 | } 25 | 26 | 27 | - (id)initWithController:(CodaPlugInsController*)inController 28 | { 29 | if ( (self = [super init]) != nil ) 30 | { 31 | controller = inController; 32 | [controller registerActionWithTitle:NSLocalizedString(@"Capitalize", @"Capitalize") target:self selector:@selector(capitalize:)]; 33 | [controller registerActionWithTitle:NSLocalizedString(@"Uncapitalize", @"Uncapitalize") target:self selector:@selector(uncapitalize:)]; 34 | } 35 | 36 | return self; 37 | } 38 | 39 | 40 | - (NSString*)name 41 | { 42 | return @"Capitalize"; 43 | } 44 | 45 | 46 | - (void)capitalize:(id)sender 47 | { 48 | CodaTextView* tv = [controller focusedTextView]; 49 | if ( tv ) 50 | { 51 | NSString* selectedText = [tv selectedText]; 52 | 53 | if ( selectedText ) 54 | { 55 | NSRange savedRange = [tv selectedRange]; 56 | [tv insertText:[selectedText uppercaseString]]; 57 | [tv setSelectedRange:savedRange]; 58 | } 59 | } 60 | } 61 | 62 | 63 | - (void)uncapitalize:(id)sender 64 | { 65 | CodaTextView* tv = [controller focusedTextView]; 66 | if ( tv ) 67 | { 68 | NSString* selectedText = [tv selectedText]; 69 | 70 | if ( selectedText ) 71 | { 72 | NSRange savedRange = [tv selectedRange]; 73 | [tv insertText:[selectedText lowercaseString]]; 74 | [tv setSelectedRange:savedRange]; 75 | } 76 | } 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/Capitalize_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Capitalize' target in the 'Capitalize' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Capitalize/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Cocoa Plug-ins/Capitalize/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleName 10 | ${PRODUCT_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.panic.plugin.Capitalize 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.1 23 | NSPrincipalClass 24 | CapitalizePlugIn 25 | CodaPlugInSupportedAPIVersion 26 | 6 27 | 28 | 29 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/PHP Validator/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.panic.Coda.PHPValidator 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | CodaAuthorString 26 | Panic Inc. 27 | CodaDescriptionString 28 | A simple PHP syntax validator. 29 | CodaIconMaskTintString 30 | #46c518 31 | CodaPlugInMinimumAPIVersion 32 | 7 33 | CodaPlugInSupportedAPIVersion 34 | 7 35 | NSHumanReadableCopyright 36 | Panic Inc. 37 | NSPrincipalClass 38 | PHPValidatorPlugIn 39 | 40 | 41 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/PHP Validator.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 42; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; 11 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; 12 | F163D8F50C67D694000A99F5 /* PHPValidatorPlugIn.m in Sources */ = {isa = PBXBuildFile; fileRef = F163D8F40C67D694000A99F5 /* PHPValidatorPlugIn.m */; }; 13 | /* End PBXBuildFile section */ 14 | 15 | /* Begin PBXFileReference section */ 16 | 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 17 | 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 18 | 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 19 | 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 20 | 32DBCF630370AF2F00C91783 /* PHPValidator_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHPValidator_Prefix.pch; sourceTree = ""; }; 21 | 3CD092330E8D7C9200D61EFB /* CodaPlugInsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodaPlugInsController.h; path = ../CodaPlugInsController.h; sourceTree = SOURCE_ROOT; }; 22 | 8D5B49B6048680CD000E48DA /* PHP Validator.codaplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PHP Validator.codaplugin"; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 24 | D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 25 | F163D8F30C67D694000A99F5 /* PHPValidatorPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHPValidatorPlugIn.h; sourceTree = ""; }; 26 | F163D8F40C67D694000A99F5 /* PHPValidatorPlugIn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHPValidatorPlugIn.m; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | 8D5B49B3048680CD000E48DA /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */, 35 | ); 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXFrameworksBuildPhase section */ 39 | 40 | /* Begin PBXGroup section */ 41 | 089C166AFE841209C02AAC07 /* Capitalize */ = { 42 | isa = PBXGroup; 43 | children = ( 44 | 08FB77AFFE84173DC02AAC07 /* Classes */, 45 | 32C88E010371C26100C91783 /* Other Sources */, 46 | 089C167CFE841241C02AAC07 /* Resources */, 47 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, 48 | 19C28FB8FE9D52D311CA2CBB /* Products */, 49 | ); 50 | name = Capitalize; 51 | sourceTree = ""; 52 | }; 53 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */, 57 | 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */, 58 | ); 59 | name = "Frameworks and Libraries"; 60 | sourceTree = ""; 61 | }; 62 | 089C167CFE841241C02AAC07 /* Resources */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 8D5B49B7048680CD000E48DA /* Info.plist */, 66 | 089C167DFE841241C02AAC07 /* InfoPlist.strings */, 67 | ); 68 | name = Resources; 69 | sourceTree = ""; 70 | }; 71 | 08FB77AFFE84173DC02AAC07 /* Classes */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 3CD092330E8D7C9200D61EFB /* CodaPlugInsController.h */, 75 | F163D8F30C67D694000A99F5 /* PHPValidatorPlugIn.h */, 76 | F163D8F40C67D694000A99F5 /* PHPValidatorPlugIn.m */, 77 | ); 78 | name = Classes; 79 | sourceTree = ""; 80 | }; 81 | 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */, 85 | ); 86 | name = "Linked Frameworks"; 87 | sourceTree = ""; 88 | }; 89 | 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 089C167FFE841241C02AAC07 /* AppKit.framework */, 93 | D2F7E65807B2D6F200F64583 /* CoreData.framework */, 94 | 089C1672FE841209C02AAC07 /* Foundation.framework */, 95 | ); 96 | name = "Other Frameworks"; 97 | sourceTree = ""; 98 | }; 99 | 19C28FB8FE9D52D311CA2CBB /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 8D5B49B6048680CD000E48DA /* PHP Validator.codaplugin */, 103 | ); 104 | name = Products; 105 | sourceTree = ""; 106 | }; 107 | 32C88E010371C26100C91783 /* Other Sources */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 32DBCF630370AF2F00C91783 /* PHPValidator_Prefix.pch */, 111 | ); 112 | name = "Other Sources"; 113 | sourceTree = ""; 114 | }; 115 | /* End PBXGroup section */ 116 | 117 | /* Begin PBXNativeTarget section */ 118 | 8D5B49AC048680CD000E48DA /* PHPValidator */ = { 119 | isa = PBXNativeTarget; 120 | buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "PHPValidator" */; 121 | buildPhases = ( 122 | 8D5B49AF048680CD000E48DA /* Resources */, 123 | 8D5B49B1048680CD000E48DA /* Sources */, 124 | 8D5B49B3048680CD000E48DA /* Frameworks */, 125 | 3C79072610D6F04000E12B3C /* ShellScript */, 126 | ); 127 | buildRules = ( 128 | ); 129 | dependencies = ( 130 | ); 131 | name = PHPValidator; 132 | productInstallPath = "$(HOME)/Library/Bundles"; 133 | productName = Capitalize; 134 | productReference = 8D5B49B6048680CD000E48DA /* PHP Validator.codaplugin */; 135 | productType = "com.apple.product-type.bundle"; 136 | }; 137 | /* End PBXNativeTarget section */ 138 | 139 | /* Begin PBXProject section */ 140 | 089C1669FE841209C02AAC07 /* Project object */ = { 141 | isa = PBXProject; 142 | attributes = { 143 | LastUpgradeCheck = 0640; 144 | }; 145 | buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "PHP Validator" */; 146 | compatibilityVersion = "Xcode 2.4"; 147 | developmentRegion = English; 148 | hasScannedForEncodings = 1; 149 | knownRegions = ( 150 | en, 151 | ); 152 | mainGroup = 089C166AFE841209C02AAC07 /* Capitalize */; 153 | projectDirPath = ""; 154 | projectRoot = ""; 155 | targets = ( 156 | 8D5B49AC048680CD000E48DA /* PHPValidator */, 157 | ); 158 | }; 159 | /* End PBXProject section */ 160 | 161 | /* Begin PBXResourcesBuildPhase section */ 162 | 8D5B49AF048680CD000E48DA /* Resources */ = { 163 | isa = PBXResourcesBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */, 167 | ); 168 | runOnlyForDeploymentPostprocessing = 0; 169 | }; 170 | /* End PBXResourcesBuildPhase section */ 171 | 172 | /* Begin PBXShellScriptBuildPhase section */ 173 | 3C79072610D6F04000E12B3C /* ShellScript */ = { 174 | isa = PBXShellScriptBuildPhase; 175 | buildActionMask = 2147483647; 176 | files = ( 177 | ); 178 | inputPaths = ( 179 | ); 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "cp -R -f \"$BUILD_DIR/$CONFIGURATION/$PRODUCT_NAME.$WRAPPER_EXTENSION\" \"$HOME/Library/Application Support/Coda/Plug-ins\""; 185 | }; 186 | /* End PBXShellScriptBuildPhase section */ 187 | 188 | /* Begin PBXSourcesBuildPhase section */ 189 | 8D5B49B1048680CD000E48DA /* Sources */ = { 190 | isa = PBXSourcesBuildPhase; 191 | buildActionMask = 2147483647; 192 | files = ( 193 | F163D8F50C67D694000A99F5 /* PHPValidatorPlugIn.m in Sources */, 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | /* End PBXSourcesBuildPhase section */ 198 | 199 | /* Begin PBXVariantGroup section */ 200 | 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { 201 | isa = PBXVariantGroup; 202 | children = ( 203 | 089C167EFE841241C02AAC07 /* English */, 204 | ); 205 | name = InfoPlist.strings; 206 | sourceTree = ""; 207 | }; 208 | /* End PBXVariantGroup section */ 209 | 210 | /* Begin XCBuildConfiguration section */ 211 | 1DEB913B08733D840010E9CD /* Debug */ = { 212 | isa = XCBuildConfiguration; 213 | buildSettings = { 214 | COMBINE_HIDPI_IMAGES = YES; 215 | COPY_PHASE_STRIP = NO; 216 | DEPLOYMENT_LOCATION = NO; 217 | DSTROOT = "$(HOME)/Library/Application Support/Coda/PlugIns"; 218 | GCC_DYNAMIC_NO_PIC = NO; 219 | GCC_ENABLE_FIX_AND_CONTINUE = YES; 220 | GCC_MODEL_TUNING = G5; 221 | GCC_OPTIMIZATION_LEVEL = 0; 222 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 223 | GCC_PREFIX_HEADER = PHPValidator_Prefix.pch; 224 | INFOPLIST_FILE = Info.plist; 225 | INSTALL_PATH = ""; 226 | PRODUCT_NAME = "PHP Validator"; 227 | SKIP_INSTALL = NO; 228 | WRAPPER_EXTENSION = codaplugin; 229 | ZERO_LINK = NO; 230 | }; 231 | name = Debug; 232 | }; 233 | 1DEB913C08733D840010E9CD /* Release */ = { 234 | isa = XCBuildConfiguration; 235 | buildSettings = { 236 | COMBINE_HIDPI_IMAGES = YES; 237 | DEPLOYMENT_LOCATION = NO; 238 | DSTROOT = "$(HOME)/Library/Application Support/Coda/PlugIns"; 239 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 240 | GCC_MODEL_TUNING = G5; 241 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 242 | GCC_PREFIX_HEADER = PHPValidator_Prefix.pch; 243 | INFOPLIST_FILE = Info.plist; 244 | INSTALL_PATH = ""; 245 | PRODUCT_NAME = "PHP Validator"; 246 | SKIP_INSTALL = NO; 247 | WRAPPER_EXTENSION = codaplugin; 248 | ZERO_LINK = NO; 249 | }; 250 | name = Release; 251 | }; 252 | 1DEB913F08733D840010E9CD /* Debug */ = { 253 | isa = XCBuildConfiguration; 254 | buildSettings = { 255 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 256 | GCC_WARN_UNUSED_VARIABLE = YES; 257 | MACOSX_DEPLOYMENT_TARGET = 10.7; 258 | ONLY_ACTIVE_ARCH = YES; 259 | }; 260 | name = Debug; 261 | }; 262 | 1DEB914008733D840010E9CD /* Release */ = { 263 | isa = XCBuildConfiguration; 264 | buildSettings = { 265 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 266 | GCC_WARN_UNUSED_VARIABLE = YES; 267 | MACOSX_DEPLOYMENT_TARGET = 10.7; 268 | }; 269 | name = Release; 270 | }; 271 | /* End XCBuildConfiguration section */ 272 | 273 | /* Begin XCConfigurationList section */ 274 | 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "PHPValidator" */ = { 275 | isa = XCConfigurationList; 276 | buildConfigurations = ( 277 | 1DEB913B08733D840010E9CD /* Debug */, 278 | 1DEB913C08733D840010E9CD /* Release */, 279 | ); 280 | defaultConfigurationIsVisible = 0; 281 | defaultConfigurationName = Release; 282 | }; 283 | 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "PHP Validator" */ = { 284 | isa = XCConfigurationList; 285 | buildConfigurations = ( 286 | 1DEB913F08733D840010E9CD /* Debug */, 287 | 1DEB914008733D840010E9CD /* Release */, 288 | ); 289 | defaultConfigurationIsVisible = 0; 290 | defaultConfigurationName = Release; 291 | }; 292 | /* End XCConfigurationList section */ 293 | }; 294 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 295 | } 296 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/PHP Validator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/PHP Validator.xcodeproj/project.xcworkspace/xcuserdata/will.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/PHP Validator/PHP Validator.xcodeproj/project.xcworkspace/xcuserdata/will.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/PHP Validator.xcodeproj/project.xcworkspace/xcuserdata/will.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/PHP Validator.xcodeproj/xcshareddata/xcschemes/PHP Validator.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 63 | 64 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/PHP Validator.xcodeproj/xcuserdata/will.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/PHP Validator.xcodeproj/xcuserdata/will.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PHP Validator.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8D5B49AC048680CD000E48DA 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/PHPValidatorPlugIn.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CodaPluginsController.h" 3 | 4 | @class PHPValidator; 5 | 6 | @interface PHPValidatorPlugIn : NSObject 7 | { 8 | } 9 | 10 | @end 11 | 12 | 13 | @interface PHPValidator : NSObject 14 | { 15 | NSTask *iTask; 16 | NSMutableArray *iErrors; 17 | NSString *iFilePath; 18 | NSString *iSource; 19 | NSStringEncoding iEncoding; 20 | id iDelegate; 21 | BOOL iCancelled; 22 | } 23 | 24 | @property (retain) NSTask *task; 25 | @property (retain) NSString* filePath; 26 | @property (retain) NSString* source; 27 | @property (assign) NSStringEncoding encoding; 28 | @property (assign) BOOL cancelled; 29 | @property (assign) id delegate; 30 | 31 | - (id)initWithText:(NSString*)text encoding:(NSStringEncoding)encoding delegate:(id)aDelegate; 32 | 33 | 34 | @end -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/PHPValidatorPlugIn.m: -------------------------------------------------------------------------------- 1 | #import "PHPValidatorPlugIn.h" 2 | #import "CodaPlugInsController.h" 3 | 4 | @implementation PHPValidatorPlugIn 5 | 6 | - (id)initWithPlugInController:(CodaPlugInsController*)aController plugInBundle:(NSObject *)plugInBundle 7 | { 8 | if ( (self = [super init]) != nil ) 9 | { 10 | } 11 | 12 | return self; 13 | } 14 | 15 | - (NSString*)name 16 | { 17 | return @"PHP Validator"; 18 | } 19 | 20 | 21 | - (id)validatorForModeIdentifier:(NSString*)modeIdentifier text:(NSString*)text encoding:(NSStringEncoding)encoding delegate:(id)aDelegate 22 | { 23 | PHPValidator *validator = [[[PHPValidator alloc] initWithText:text encoding:encoding delegate:aDelegate] autorelease]; 24 | 25 | return validator; 26 | } 27 | 28 | 29 | - (NSArray*)supportedModeIdentifiers 30 | { 31 | return [NSArray arrayWithObject:@"SEEMode.PHP-HTML"]; 32 | } 33 | 34 | 35 | @end 36 | 37 | 38 | @implementation PHPValidator 39 | 40 | @synthesize filePath = iFilePath; 41 | @synthesize task = iTask; 42 | @synthesize delegate = iDelegate; 43 | @synthesize source = iSource; 44 | @synthesize encoding = iEncoding; 45 | @synthesize cancelled = iCancelled; 46 | 47 | - (id)initWithText:(NSString*)text encoding:(NSStringEncoding)encoding delegate:(id)aDelegate 48 | { 49 | if ( (self = [super init]) != nil ) 50 | { 51 | CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorSystemDefault); 52 | CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorSystemDefault, uuid); 53 | NSString *path = [NSTemporaryDirectory() stringByAppendingPathComponent:(NSString*)uuidString]; 54 | 55 | self.filePath = [path stringByAppendingString:@"###.php"]; 56 | self.delegate = aDelegate; 57 | self.source = text; 58 | self.encoding = encoding; 59 | 60 | if ( uuid != NULL ) CFRelease(uuid); 61 | if ( uuidString != NULL ) CFRelease(uuidString); 62 | } 63 | 64 | return self; 65 | } 66 | 67 | 68 | - (void)validate 69 | { 70 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 71 | 72 | if ( [self.source writeToFile:self.filePath atomically:NO encoding:self.encoding error:NULL] ) 73 | { 74 | NSArray *args = [NSArray arrayWithObjects:@"-l", self.filePath, @"-d", @"display_errors=On", @"d", @"log_errors=Off", nil]; 75 | self.task = [[[NSTask alloc] init] autorelease]; 76 | [self.task setLaunchPath:@"/usr/bin/php"]; 77 | [self.task setArguments:args]; 78 | [self.task setStandardOutput:[NSPipe pipe]]; 79 | 80 | [[NSNotificationCenter defaultCenter] addObserver:self 81 | selector:@selector(taskDidEnd:) 82 | name:NSTaskDidTerminateNotification 83 | object:self.task]; 84 | 85 | @try 86 | { 87 | [self.task launch]; 88 | 89 | while ( !self.cancelled && [self.task isRunning] ) 90 | { 91 | [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1]]; 92 | } 93 | } 94 | @catch (NSException *exception) 95 | { 96 | NSLog(@"Error staring validator:%@", [exception description]); 97 | [self.delegate validator:self didComplete:nil error:[NSError errorWithDomain:CodaPluginErrorDomain code:-2 userInfo:nil]]; 98 | } 99 | } 100 | else 101 | { 102 | NSLog(@"Could not write file to path:%@", self.filePath); 103 | [self.delegate validator:self didComplete:nil error:[NSError errorWithDomain:CodaPluginErrorDomain code:-1 userInfo:nil]]; 104 | } 105 | 106 | [pool drain]; 107 | } 108 | 109 | 110 | - (void)dealloc 111 | { 112 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 113 | 114 | //clean up our temp file 115 | NSFileManager *mgr = [[[NSFileManager alloc] init] autorelease]; 116 | [mgr removeItemAtPath:self.filePath error:NULL]; 117 | 118 | [iFilePath release]; 119 | [iTask release]; 120 | [iSource release]; 121 | 122 | [super dealloc]; 123 | } 124 | 125 | 126 | - (void)cancel 127 | { 128 | self.cancelled = YES; 129 | 130 | if ( [self.task isRunning] ) 131 | [self.task terminate]; 132 | } 133 | 134 | 135 | - (NSString*)name 136 | { 137 | return @"PHP"; 138 | } 139 | 140 | 141 | BOOL ContainsString(NSString *string1, NSString *string2) 142 | { 143 | return ([string1 rangeOfString:string2 options:0].location != NSNotFound); 144 | } 145 | 146 | 147 | - (void)taskDidEnd:(NSNotification*)notification 148 | { 149 | [[NSNotificationCenter defaultCenter] removeObserver:self name:NSTaskDidTerminateNotification object:self.task]; 150 | 151 | if ( !self.cancelled ) 152 | { 153 | NSData *data = [[[self.task standardOutput] fileHandleForReading] availableData]; 154 | NSString *dataString = nil; 155 | 156 | if ( data ) 157 | dataString = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]; 158 | 159 | //this linter only supports one error at a time, parse & return it 160 | NSArray *results = nil; 161 | 162 | if ( ContainsString(dataString, @"No syntax errors detected") ) 163 | { 164 | results = [NSArray array]; 165 | } 166 | else 167 | { 168 | //parse error output 169 | NSScanner *scanner = [NSScanner scannerWithString:dataString]; 170 | [scanner setCharactersToBeSkipped:nil]; 171 | 172 | NSString *lineNumber = nil; 173 | NSString *message = nil; 174 | 175 | [scanner scanUpToString:@"\nParse error: " intoString:NULL]; 176 | [scanner scanString:@"\nParse error: " intoString:NULL]; 177 | [scanner scanString:@"parse error, " intoString:NULL]; 178 | [scanner scanUpToString:[NSString stringWithFormat:@" in %@", self.filePath] intoString:&message]; 179 | 180 | [scanner scanUpToString:@" on line " intoString:NULL]; 181 | [scanner scanString:@" on line " intoString:NULL]; 182 | [scanner scanUpToString:@"\n" intoString:&lineNumber]; 183 | 184 | if ( lineNumber == nil ) 185 | lineNumber = @"1"; 186 | 187 | if ( message == nil ) 188 | message = @""; 189 | 190 | NSDictionary *error = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:[lineNumber integerValue]], kValidatorLineKey, 191 | message, kValidatorMessageStringKey, kValidatorTypeError, kValidatorErrorTypeKey, nil]; 192 | results = [NSArray arrayWithObject:error]; 193 | } 194 | 195 | [self.delegate validator:self didComplete:results error:nil]; 196 | } 197 | } 198 | 199 | @end 200 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/PHP Validator/PHPValidator_Prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/README.md: -------------------------------------------------------------------------------- 1 | ## Using the Cocoa plug-in API 2 | 3 | If you can program Cocoa, you can write plug-ins that work directly and natively within Coda. They execute a bit faster, and can offer additional functionality such as opening windows or presenting a user interface. 4 | 5 | Coda plug-ins are Cocoa bundles with a `.codaplugin` filename extension. 6 | 7 | Coda looks for plug-ins recursively in the **Home > Library > Application Support > Coda > Plug-ins** folder. Any plug-ins found will be loaded, and one instance of the plug-in's principal class created. 8 | 9 | If your plug-in's Info.plist contains the `CodaPlugInSupportedAPIVersion` key with a value of 7 or higher, your instance will be sent the following message: 10 | 11 | ```objective-c 12 | - (id)initWithPlugInController:(CodaPlugInsController*)aController plugInBundle:(NSObject *)plugInBundle; 13 | ``` 14 | 15 | > Note: this may be called on a secondary thread. Please ensure this method is thread-safe. 16 | 17 | This allows Coda to load your plug-in more quickly on versions 2.0.1 and higher. 18 | 19 | Otherwise, it will be sent the following message (which is deprecated as of API version 6): 20 | 21 | ```objective-c 22 | - (id)initWithPlugInController:(CodaPlugInsController*)inController bundle:(NSBundle*)yourBundle; 23 | ``` 24 | 25 | CodaPlugInsController provides the means for the plug-in to communicate with Coda itself. You must also implement the following method in your plug-in: 26 | 27 | ```objective-c 28 | - (NSString*)name; 29 | ``` 30 | 31 | This method should simply return the desired display name of your plug-in. Keep it short, because this may be used to generate user interface elements, such as menu items. 32 | 33 | **Please refer to CodaPluginController.h for the complete API reference.** 34 | 35 | ### Info.plist values for Coda plug-ins 36 | 37 | To specify that your plug-in requires a certain minimum version of the Coda plug-in API, add the `CodaPlugInMinimumAPIVersion` key to your plug-in's Info.plist. The value of this key is an integer corresponding to the values returned by the `-apiVersion` method. 38 | 39 | If you do not specify a minimum version, Coda will assume your plug-in is compliant with the API in the running version of Coda. If you call API that doesn't exist in the running version of Coda, an exception will be thrown. 40 | 41 | This key is supported by Coda 1.6.1 and later. 42 | 43 | The `CodaPlugInSupportedAPIVersion` key tells Coda which version of the API your plug-in is aware of. This affects which messages your plug-in will receive. 44 | 45 | This key is recognized by Coda 2.0.1 and later. If set to 6 or higher, and you implement the API 6 init method, your plug-in will be loaded more quickly by Coda 2.0.1 and later. 46 | 47 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/WriteUTFBOM/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/WriteUTFBOM/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Cocoa Plug-ins/WriteUTFBOM/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.panic.Coda.WriteUTFBOM 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.2 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | CodaAuthorString 26 | Panic Inc. 27 | CodaDescriptionString 28 | Edit UTF BOM (Byte Order Marker) 29 | CodaIconMaskTintString 30 | #FEB171 31 | CodaPlugInMinimumAPIVersion 32 | 5 33 | CodaPlugInSupportedAPIVersion 34 | 6 35 | LSMinimumSystemVersion 36 | 10.6 37 | NSHumanReadableCopyright 38 | Panic Inc. 39 | NSPrincipalClass 40 | WriteUTFBOMPlugIn 41 | 42 | 43 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/WriteUTFBOM/WriteUTFBOM.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; 11 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; 12 | F163D8F50C67D694000A99F5 /* WriteUTFBOMPlugIn.m in Sources */ = {isa = PBXBuildFile; fileRef = F163D8F40C67D694000A99F5 /* WriteUTFBOMPlugIn.m */; }; 13 | /* End PBXBuildFile section */ 14 | 15 | /* Begin PBXFileReference section */ 16 | 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 17 | 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 18 | 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 19 | 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 20 | 32DBCF630370AF2F00C91783 /* WriteUTFBOM_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WriteUTFBOM_Prefix.pch; sourceTree = ""; }; 21 | 3CD092330E8D7C9200D61EFB /* CodaPlugInsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodaPlugInsController.h; path = ../CodaPlugInsController.h; sourceTree = SOURCE_ROOT; }; 22 | 8D5B49B6048680CD000E48DA /* WriteUTFBOM.codaplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WriteUTFBOM.codaplugin; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 24 | D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 25 | F163D8F30C67D694000A99F5 /* WriteUTFBOMPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WriteUTFBOMPlugIn.h; sourceTree = ""; }; 26 | F163D8F40C67D694000A99F5 /* WriteUTFBOMPlugIn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WriteUTFBOMPlugIn.m; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | 8D5B49B3048680CD000E48DA /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */, 35 | ); 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXFrameworksBuildPhase section */ 39 | 40 | /* Begin PBXGroup section */ 41 | 089C166AFE841209C02AAC07 /* Capitalize */ = { 42 | isa = PBXGroup; 43 | children = ( 44 | 08FB77AFFE84173DC02AAC07 /* Classes */, 45 | 32C88E010371C26100C91783 /* Other Sources */, 46 | 089C167CFE841241C02AAC07 /* Resources */, 47 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, 48 | 19C28FB8FE9D52D311CA2CBB /* Products */, 49 | ); 50 | name = Capitalize; 51 | sourceTree = ""; 52 | }; 53 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */, 57 | 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */, 58 | ); 59 | name = "Frameworks and Libraries"; 60 | sourceTree = ""; 61 | }; 62 | 089C167CFE841241C02AAC07 /* Resources */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 8D5B49B7048680CD000E48DA /* Info.plist */, 66 | 089C167DFE841241C02AAC07 /* InfoPlist.strings */, 67 | ); 68 | name = Resources; 69 | sourceTree = ""; 70 | }; 71 | 08FB77AFFE84173DC02AAC07 /* Classes */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 3CD092330E8D7C9200D61EFB /* CodaPlugInsController.h */, 75 | F163D8F30C67D694000A99F5 /* WriteUTFBOMPlugIn.h */, 76 | F163D8F40C67D694000A99F5 /* WriteUTFBOMPlugIn.m */, 77 | ); 78 | name = Classes; 79 | sourceTree = ""; 80 | }; 81 | 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */, 85 | ); 86 | name = "Linked Frameworks"; 87 | sourceTree = ""; 88 | }; 89 | 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 089C167FFE841241C02AAC07 /* AppKit.framework */, 93 | D2F7E65807B2D6F200F64583 /* CoreData.framework */, 94 | 089C1672FE841209C02AAC07 /* Foundation.framework */, 95 | ); 96 | name = "Other Frameworks"; 97 | sourceTree = ""; 98 | }; 99 | 19C28FB8FE9D52D311CA2CBB /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 8D5B49B6048680CD000E48DA /* WriteUTFBOM.codaplugin */, 103 | ); 104 | name = Products; 105 | sourceTree = ""; 106 | }; 107 | 32C88E010371C26100C91783 /* Other Sources */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 32DBCF630370AF2F00C91783 /* WriteUTFBOM_Prefix.pch */, 111 | ); 112 | name = "Other Sources"; 113 | sourceTree = ""; 114 | }; 115 | /* End PBXGroup section */ 116 | 117 | /* Begin PBXNativeTarget section */ 118 | 8D5B49AC048680CD000E48DA /* WriteUTFBOM */ = { 119 | isa = PBXNativeTarget; 120 | buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "WriteUTFBOM" */; 121 | buildPhases = ( 122 | 8D5B49AF048680CD000E48DA /* Resources */, 123 | 8D5B49B1048680CD000E48DA /* Sources */, 124 | 8D5B49B3048680CD000E48DA /* Frameworks */, 125 | 3C79072610D6F04000E12B3C /* ShellScript */, 126 | ); 127 | buildRules = ( 128 | ); 129 | dependencies = ( 130 | ); 131 | name = WriteUTFBOM; 132 | productInstallPath = "$(HOME)/Library/Bundles"; 133 | productName = Capitalize; 134 | productReference = 8D5B49B6048680CD000E48DA /* WriteUTFBOM.codaplugin */; 135 | productType = "com.apple.product-type.bundle"; 136 | }; 137 | /* End PBXNativeTarget section */ 138 | 139 | /* Begin PBXProject section */ 140 | 089C1669FE841209C02AAC07 /* Project object */ = { 141 | isa = PBXProject; 142 | attributes = { 143 | LastUpgradeCheck = 0730; 144 | }; 145 | buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "WriteUTFBOM" */; 146 | compatibilityVersion = "Xcode 3.2"; 147 | developmentRegion = English; 148 | hasScannedForEncodings = 1; 149 | knownRegions = ( 150 | en, 151 | ); 152 | mainGroup = 089C166AFE841209C02AAC07 /* Capitalize */; 153 | projectDirPath = ""; 154 | projectRoot = ""; 155 | targets = ( 156 | 8D5B49AC048680CD000E48DA /* WriteUTFBOM */, 157 | ); 158 | }; 159 | /* End PBXProject section */ 160 | 161 | /* Begin PBXResourcesBuildPhase section */ 162 | 8D5B49AF048680CD000E48DA /* Resources */ = { 163 | isa = PBXResourcesBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */, 167 | ); 168 | runOnlyForDeploymentPostprocessing = 0; 169 | }; 170 | /* End PBXResourcesBuildPhase section */ 171 | 172 | /* Begin PBXShellScriptBuildPhase section */ 173 | 3C79072610D6F04000E12B3C /* ShellScript */ = { 174 | isa = PBXShellScriptBuildPhase; 175 | buildActionMask = 2147483647; 176 | files = ( 177 | ); 178 | inputPaths = ( 179 | ); 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "cp -R -f \"$BUILD_DIR/$CONFIGURATION/$PRODUCT_NAME.$WRAPPER_EXTENSION\" \"$HOME/Library/Application Support/Coda 2/Plug-ins\""; 185 | }; 186 | /* End PBXShellScriptBuildPhase section */ 187 | 188 | /* Begin PBXSourcesBuildPhase section */ 189 | 8D5B49B1048680CD000E48DA /* Sources */ = { 190 | isa = PBXSourcesBuildPhase; 191 | buildActionMask = 2147483647; 192 | files = ( 193 | F163D8F50C67D694000A99F5 /* WriteUTFBOMPlugIn.m in Sources */, 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | /* End PBXSourcesBuildPhase section */ 198 | 199 | /* Begin PBXVariantGroup section */ 200 | 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { 201 | isa = PBXVariantGroup; 202 | children = ( 203 | 089C167EFE841241C02AAC07 /* English */, 204 | ); 205 | name = InfoPlist.strings; 206 | sourceTree = ""; 207 | }; 208 | /* End PBXVariantGroup section */ 209 | 210 | /* Begin XCBuildConfiguration section */ 211 | 1DEB913B08733D840010E9CD /* Debug */ = { 212 | isa = XCBuildConfiguration; 213 | buildSettings = { 214 | COMBINE_HIDPI_IMAGES = YES; 215 | CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; 216 | COPY_PHASE_STRIP = NO; 217 | DEPLOYMENT_LOCATION = NO; 218 | DSTROOT = "$(HOME)/Library/Application Support/Coda/PlugIns"; 219 | GCC_DYNAMIC_NO_PIC = NO; 220 | GCC_ENABLE_FIX_AND_CONTINUE = YES; 221 | GCC_MODEL_TUNING = G5; 222 | GCC_OPTIMIZATION_LEVEL = 0; 223 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 224 | GCC_PREFIX_HEADER = WriteUTFBOM_Prefix.pch; 225 | INFOPLIST_FILE = Info.plist; 226 | INSTALL_PATH = ""; 227 | MACOSX_DEPLOYMENT_TARGET = 10.7; 228 | PRODUCT_NAME = WriteUTFBOM; 229 | SKIP_INSTALL = NO; 230 | WRAPPER_EXTENSION = codaplugin; 231 | ZERO_LINK = NO; 232 | }; 233 | name = Debug; 234 | }; 235 | 1DEB913C08733D840010E9CD /* Release */ = { 236 | isa = XCBuildConfiguration; 237 | buildSettings = { 238 | COMBINE_HIDPI_IMAGES = YES; 239 | DEPLOYMENT_LOCATION = NO; 240 | DSTROOT = "$(HOME)/Library/Application Support/Coda/PlugIns"; 241 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 242 | GCC_MODEL_TUNING = G5; 243 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 244 | GCC_PREFIX_HEADER = WriteUTFBOM_Prefix.pch; 245 | INFOPLIST_FILE = Info.plist; 246 | INSTALL_PATH = ""; 247 | MACOSX_DEPLOYMENT_TARGET = 10.7; 248 | PRODUCT_NAME = WriteUTFBOM; 249 | SKIP_INSTALL = NO; 250 | WRAPPER_EXTENSION = codaplugin; 251 | ZERO_LINK = NO; 252 | }; 253 | name = Release; 254 | }; 255 | 1DEB913F08733D840010E9CD /* Debug */ = { 256 | isa = XCBuildConfiguration; 257 | buildSettings = { 258 | ENABLE_TESTABILITY = YES; 259 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 260 | GCC_WARN_UNUSED_VARIABLE = YES; 261 | MACOSX_DEPLOYMENT_TARGET = 10.6; 262 | ONLY_ACTIVE_ARCH = YES; 263 | }; 264 | name = Debug; 265 | }; 266 | 1DEB914008733D840010E9CD /* Release */ = { 267 | isa = XCBuildConfiguration; 268 | buildSettings = { 269 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 270 | GCC_WARN_UNUSED_VARIABLE = YES; 271 | MACOSX_DEPLOYMENT_TARGET = 10.6; 272 | }; 273 | name = Release; 274 | }; 275 | /* End XCBuildConfiguration section */ 276 | 277 | /* Begin XCConfigurationList section */ 278 | 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "WriteUTFBOM" */ = { 279 | isa = XCConfigurationList; 280 | buildConfigurations = ( 281 | 1DEB913B08733D840010E9CD /* Debug */, 282 | 1DEB913C08733D840010E9CD /* Release */, 283 | ); 284 | defaultConfigurationIsVisible = 0; 285 | defaultConfigurationName = Release; 286 | }; 287 | 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "WriteUTFBOM" */ = { 288 | isa = XCConfigurationList; 289 | buildConfigurations = ( 290 | 1DEB913F08733D840010E9CD /* Debug */, 291 | 1DEB914008733D840010E9CD /* Release */, 292 | ); 293 | defaultConfigurationIsVisible = 0; 294 | defaultConfigurationName = Release; 295 | }; 296 | /* End XCConfigurationList section */ 297 | }; 298 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 299 | } 300 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/WriteUTFBOM/WriteUTFBOM.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/WriteUTFBOM/WriteUTFBOMPlugIn.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CodaPluginsController.h" 3 | 4 | @class CodaPlugInsController; 5 | 6 | @interface WriteUTFBOMPlugIn : NSObject 7 | { 8 | CodaPlugInsController* controller; 9 | } 10 | 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/WriteUTFBOM/WriteUTFBOMPlugIn.m: -------------------------------------------------------------------------------- 1 | #import "WriteUTFBOMPlugIn.h" 2 | #import "CodaPlugInsController.h" 3 | 4 | @interface WriteUTFBOMPlugIn () 5 | 6 | - (id)initWithController:(CodaPlugInsController*)inController; 7 | 8 | @end 9 | 10 | @interface NSData (BOM) 11 | 12 | + (NSData*)pc_dataWithContentsOfFileAtPath:(NSString*)path numberOfBytes:(size_t)numberOfBytes; 13 | + (NSData*)pc_UTF8BOM; 14 | - (BOOL)pc_hasUTF8BOM; 15 | - (BOOL)pc_hasUTF16BOM; 16 | 17 | @end 18 | 19 | @implementation NSData (BOM) 20 | 21 | + (NSData*)pc_dataWithContentsOfFileAtPath:(NSString*)path numberOfBytes:(size_t)numberOfBytes 22 | { 23 | NSData* data = nil; 24 | int descriptor = open([path fileSystemRepresentation], O_RDONLY, 0); 25 | 26 | if ( descriptor != 0 ) 27 | { 28 | char* bytes = malloc(numberOfBytes); 29 | 30 | if ( bytes != NULL ) 31 | { 32 | size_t sizeRead = 0; 33 | 34 | do 35 | { 36 | sizeRead = read(descriptor + sizeRead, bytes, numberOfBytes - sizeRead); 37 | } while ( sizeRead > 0 && sizeRead < numberOfBytes ); 38 | 39 | close(descriptor); 40 | 41 | if ( sizeRead == numberOfBytes ) 42 | { 43 | data = [NSData dataWithBytesNoCopy:bytes length:numberOfBytes]; 44 | } 45 | 46 | if ( data == nil ) 47 | { 48 | free(bytes); 49 | } 50 | } 51 | } 52 | 53 | return data; 54 | } 55 | 56 | static const char kUTF8BOM[] = {0xEF, 0xBB, 0xBF}; 57 | 58 | + (NSData*)pc_UTF8BOM 59 | { 60 | return [[[NSData alloc] initWithBytes:kUTF8BOM length:sizeof(kUTF8BOM)] autorelease]; 61 | } 62 | 63 | - (BOOL)pc_hasUTF8BOM 64 | { 65 | BOOL hasBOM = NO; 66 | 67 | if ( [self length] >= sizeof(kUTF8BOM) ) 68 | { 69 | char prefix[sizeof(kUTF8BOM)]; 70 | 71 | [self getBytes:&prefix range:NSMakeRange(0, sizeof(kUTF8BOM))]; 72 | 73 | hasBOM = (memcmp(kUTF8BOM, prefix, sizeof(kUTF8BOM)) == 0); 74 | } 75 | 76 | return hasBOM; 77 | } 78 | 79 | static const uint16_t kUTF16LEBOM = 0xFFFE; 80 | static const uint16_t kUTF16BEBOM = 0xFEFF; 81 | 82 | + (NSData*)pc_UTF16BOM 83 | { 84 | #if defined(__BIG_ENDIAN__) 85 | return [[[NSData alloc] initWithBytes:&kUTF16BEBOM length:sizeof(kUTF16BEBOM)] autorelease]; 86 | #else 87 | return [[[NSData alloc] initWithBytes:&kUTF16LEBOM length:sizeof(kUTF16LEBOM)] autorelease]; 88 | #endif 89 | } 90 | 91 | - (BOOL)pc_hasUTF16BOM 92 | { 93 | BOOL hasBOM = NO; 94 | 95 | if ( [self length] >= sizeof(uint16_t) ) 96 | { 97 | uint16_t prefix = 0; 98 | [self getBytes:&prefix range:NSMakeRange(0, sizeof(uint16_t))]; 99 | 100 | hasBOM = (prefix == kUTF16LEBOM || prefix == kUTF16BEBOM); 101 | } 102 | 103 | return hasBOM; 104 | } 105 | 106 | @end 107 | 108 | @implementation WriteUTFBOMPlugIn 109 | 110 | 111 | //2.0 and lower 112 | - (id)initWithPlugInController:(CodaPlugInsController*)aController bundle:(NSBundle*)aBundle 113 | { 114 | return [self initWithController:aController]; 115 | } 116 | 117 | 118 | //2.0.1 and higher 119 | - (id)initWithPlugInController:(CodaPlugInsController*)aController plugInBundle:(NSObject *)plugInBundle 120 | { 121 | return [self initWithController:aController]; 122 | } 123 | 124 | 125 | - (id)initWithController:(CodaPlugInsController*)inController 126 | { 127 | if ( (self = [super init]) != nil ) 128 | { 129 | controller = inController; 130 | 131 | [controller registerActionWithTitle:NSLocalizedString(@"Save with UTF BOM", @"Save with UTF BOM") target:self selector:@selector(writeUTFBOM:)]; 132 | [controller registerActionWithTitle:NSLocalizedString(@"Save without UTF BOM", @"Save without UTF BOM") target:self selector:@selector(writeWithoutUTFBOM:)]; 133 | } 134 | return self; 135 | } 136 | 137 | 138 | - (NSString*)name 139 | { 140 | return @"UTF BOMs"; 141 | } 142 | 143 | 144 | - (void)writeUTFBOM:(id)sender 145 | { 146 | CodaTextView* textView = [controller focusedTextView]; 147 | 148 | if ( [textView path] != nil && [[NSFileManager defaultManager] fileExistsAtPath:[textView path]] ) 149 | { 150 | NSData* data = [[textView string] dataUsingEncoding:[textView encoding] allowLossyConversion:NO]; 151 | 152 | if ( data != nil ) 153 | { 154 | if ( [textView encoding] == NSUTF8StringEncoding ) 155 | { 156 | if ( ![data pc_hasUTF8BOM] ) 157 | { 158 | NSMutableData* tmp = [NSMutableData dataWithData:[NSData pc_UTF8BOM]]; 159 | [tmp appendData:data]; 160 | data = tmp; 161 | } 162 | 163 | [textView save]; 164 | [data writeToFile:[textView path] atomically:NO]; 165 | [[NSNotificationCenter defaultCenter] postNotificationName:@"CodaPlugInNotificationDidPerformAction" object:self userInfo:[NSDictionary dictionaryWithObject:NSStringFromSelector(_cmd) forKey:@"Action"]]; 166 | } 167 | else if ( [textView encoding] == NSUnicodeStringEncoding || [textView encoding] == NSUTF16BigEndianStringEncoding || [textView encoding] == NSUTF16LittleEndianStringEncoding ) 168 | { 169 | [textView save]; 170 | [data writeToFile:[textView path] atomically:NO]; 171 | [[NSNotificationCenter defaultCenter] postNotificationName:@"CodaPlugInNotificationDidPerformAction" object:self userInfo:[NSDictionary dictionaryWithObject:NSStringFromSelector(_cmd) forKey:@"Action"]]; 172 | } 173 | } 174 | } 175 | } 176 | 177 | - (void)writeWithoutUTFBOM:(id)sender 178 | { 179 | CodaTextView* textView = [controller focusedTextView]; 180 | 181 | if ( [textView path] != nil && [[NSFileManager defaultManager] fileExistsAtPath:[textView path]] ) 182 | { 183 | if ( [textView encoding] == NSUTF8StringEncoding ) 184 | { 185 | NSData* data = [[textView string] dataUsingEncoding:[textView encoding] allowLossyConversion:NO]; 186 | 187 | if ( [data pc_hasUTF8BOM] ) 188 | { 189 | data = [data subdataWithRange:NSMakeRange([[NSData pc_UTF8BOM] length], [data length] - [[NSData pc_UTF8BOM] length])]; 190 | } 191 | 192 | [textView save]; 193 | [data writeToFile:[textView path] atomically:NO]; 194 | [[NSNotificationCenter defaultCenter] postNotificationName:@"CodaPlugInNotificationDidPerformAction" object:self userInfo:[NSDictionary dictionaryWithObject:NSStringFromSelector(_cmd) forKey:@"Action"]]; 195 | } 196 | } 197 | } 198 | 199 | - (BOOL)validateMenuItem:(NSMenuItem*)menuItem 200 | { 201 | BOOL menuItemIsValid = NO; 202 | 203 | if ( [menuItem action] == @selector(writeUTFBOM:) ) 204 | { 205 | CodaTextView* textView = [controller focusedTextView]; 206 | 207 | if ( [textView path] != nil ) 208 | { 209 | if ( [textView encoding] == NSUTF8StringEncoding ) 210 | { 211 | NSData* fileData = [NSData pc_dataWithContentsOfFileAtPath:[textView path] numberOfBytes:[[NSData pc_UTF8BOM] length]]; 212 | menuItemIsValid = ![fileData pc_hasUTF8BOM]; 213 | } 214 | else if ( [textView encoding] == NSUnicodeStringEncoding || [textView encoding] == NSUTF16BigEndianStringEncoding || [textView encoding] == NSUTF16LittleEndianStringEncoding ) 215 | { 216 | NSData* fileData = [NSData pc_dataWithContentsOfFileAtPath:[textView path] numberOfBytes:[[NSData pc_UTF16BOM] length]]; 217 | menuItemIsValid = ![fileData pc_hasUTF16BOM]; 218 | } 219 | } 220 | } 221 | else if ( [menuItem action] == @selector(writeWithoutUTFBOM:) ) 222 | { 223 | CodaTextView* textView = [controller focusedTextView]; 224 | 225 | if ( [textView path] != nil ) 226 | { 227 | if ( [textView encoding] == NSUTF8StringEncoding ) 228 | { 229 | NSData* fileData = [NSData pc_dataWithContentsOfFileAtPath:[textView path] numberOfBytes:[[NSData pc_UTF8BOM] length]]; 230 | menuItemIsValid = [fileData pc_hasUTF8BOM]; 231 | } 232 | } 233 | } 234 | 235 | return menuItemIsValid; 236 | } 237 | 238 | @end 239 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/WriteUTFBOM/WriteUTFBOM_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Capitalize' target in the 'Capitalize' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Zap Gremlins Sidebar/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Zap Gremlins Sidebar/English.lproj/Localizable.strings -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/English.lproj/ZapDialog.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Zap Gremlins Sidebar/English.lproj/ZapDialog.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodaIconHighlightHexColor 6 | #9100FF 7 | CodaDescriptionString 8 | A sample Cocoa sidebar plugin for Coda. 9 | CodaAuthorString 10 | Wade Cosgrove 11 | CodaIconMaskFile 12 | gizmo 13 | BuildMachineOSBuild 14 | 12E55 15 | CFBundleDevelopmentRegion 16 | English 17 | CFBundleExecutable 18 | Zap Gremlins 19 | CFBundleIdentifier 20 | com.panic.plugin.ZapGremlins 21 | CFBundleInfoDictionaryVersion 22 | 6.0 23 | CFBundleName 24 | Zap Gremlins 25 | CFBundlePackageType 26 | BNDL 27 | CFBundleSignature 28 | ???? 29 | CFBundleShortVersionString 30 | 1.1 31 | CodaPlugInSupportedAPIVersion 32 | 6 33 | DTCompiler 34 | 35 | DTPlatformBuild 36 | 4H1003 37 | DTPlatformVersion 38 | GM 39 | DTSDKBuild 40 | 11E52 41 | DTSDKName 42 | macosx10.7 43 | DTXcode 44 | 0462 45 | DTXcodeBuild 46 | 4H1003 47 | NSPrincipalClass 48 | ZapPlugIn 49 | 50 | 51 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/Zap Gremlins.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 18A8C99E174D8CF300C9AC29 /* gizmo.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 18A8C99D174D8CF300C9AC29 /* gizmo.pdf */; }; 11 | 18B4AC38174AE821001B5315 /* ZapPlugInViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18B4AC37174AE821001B5315 /* ZapPlugInViewController.m */; }; 12 | 18C79B59176139D100BB3AB6 /* ZapPlugIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C79B58176139D100BB3AB6 /* ZapPlugIn.m */; }; 13 | 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; 14 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; 15 | BEAA0D4F0EB0F2B6002630D0 /* ZapDialog.nib in Resources */ = {isa = PBXBuildFile; fileRef = BEAA0D4D0EB0F2B6002630D0 /* ZapDialog.nib */; }; 16 | BEAA0F3C0EB125CD002630D0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = BEAA0F3B0EB125CD002630D0 /* Localizable.strings */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 21 | 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 22 | 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 23 | 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 24 | 18A8C99D174D8CF300C9AC29 /* gizmo.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = gizmo.pdf; sourceTree = ""; }; 25 | 18B4AC36174AE821001B5315 /* ZapPlugInViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZapPlugInViewController.h; sourceTree = ""; }; 26 | 18B4AC37174AE821001B5315 /* ZapPlugInViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZapPlugInViewController.m; sourceTree = ""; }; 27 | 18C79B57176139D100BB3AB6 /* ZapPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZapPlugIn.h; sourceTree = ""; }; 28 | 18C79B58176139D100BB3AB6 /* ZapPlugIn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZapPlugIn.m; sourceTree = ""; }; 29 | 32DBCF630370AF2F00C91783 /* Zap Gremlins_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Zap Gremlins_Prefix.pch"; sourceTree = ""; }; 30 | 8D5B49B6048680CD000E48DA /* Zap Gremlins.codasidebar */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Zap Gremlins.codasidebar"; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | BEAA0D3B0EB0F06F002630D0 /* CodaPlugInsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodaPlugInsController.h; path = ../CodaPlugInsController.h; sourceTree = SOURCE_ROOT; }; 33 | BEAA0D460EB0F0BC002630D0 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = ""; }; 34 | BEAA0D4E0EB0F2B6002630D0 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/ZapDialog.nib; sourceTree = ""; }; 35 | D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | 8D5B49B3048680CD000E48DA /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */, 44 | ); 45 | runOnlyForDeploymentPostprocessing = 0; 46 | }; 47 | /* End PBXFrameworksBuildPhase section */ 48 | 49 | /* Begin PBXGroup section */ 50 | 089C166AFE841209C02AAC07 /* Zap Gremlins */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 08FB77AFFE84173DC02AAC07 /* Classes */, 54 | 32C88E010371C26100C91783 /* Other Sources */, 55 | 089C167CFE841241C02AAC07 /* Resources */, 56 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, 57 | 19C28FB8FE9D52D311CA2CBB /* Products */, 58 | ); 59 | name = "Zap Gremlins"; 60 | sourceTree = ""; 61 | }; 62 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */, 66 | 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */, 67 | ); 68 | name = "Frameworks and Libraries"; 69 | sourceTree = ""; 70 | }; 71 | 089C167CFE841241C02AAC07 /* Resources */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 18A8C99D174D8CF300C9AC29 /* gizmo.pdf */, 75 | 8D5B49B7048680CD000E48DA /* Info.plist */, 76 | 089C167DFE841241C02AAC07 /* InfoPlist.strings */, 77 | BEAA0F3B0EB125CD002630D0 /* Localizable.strings */, 78 | BEAA0D4D0EB0F2B6002630D0 /* ZapDialog.nib */, 79 | ); 80 | name = Resources; 81 | sourceTree = ""; 82 | }; 83 | 08FB77AFFE84173DC02AAC07 /* Classes */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | BEAA0D3B0EB0F06F002630D0 /* CodaPlugInsController.h */, 87 | 18C79B57176139D100BB3AB6 /* ZapPlugIn.h */, 88 | 18C79B58176139D100BB3AB6 /* ZapPlugIn.m */, 89 | 18B4AC36174AE821001B5315 /* ZapPlugInViewController.h */, 90 | 18B4AC37174AE821001B5315 /* ZapPlugInViewController.m */, 91 | ); 92 | name = Classes; 93 | sourceTree = ""; 94 | }; 95 | 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */, 99 | ); 100 | name = "Linked Frameworks"; 101 | sourceTree = ""; 102 | }; 103 | 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 089C167FFE841241C02AAC07 /* AppKit.framework */, 107 | D2F7E65807B2D6F200F64583 /* CoreData.framework */, 108 | 089C1672FE841209C02AAC07 /* Foundation.framework */, 109 | ); 110 | name = "Other Frameworks"; 111 | sourceTree = ""; 112 | }; 113 | 19C28FB8FE9D52D311CA2CBB /* Products */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 8D5B49B6048680CD000E48DA /* Zap Gremlins.codasidebar */, 117 | ); 118 | name = Products; 119 | sourceTree = ""; 120 | }; 121 | 32C88E010371C26100C91783 /* Other Sources */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 32DBCF630370AF2F00C91783 /* Zap Gremlins_Prefix.pch */, 125 | ); 126 | name = "Other Sources"; 127 | sourceTree = ""; 128 | }; 129 | /* End PBXGroup section */ 130 | 131 | /* Begin PBXNativeTarget section */ 132 | 8D5B49AC048680CD000E48DA /* Zap Gremlins */ = { 133 | isa = PBXNativeTarget; 134 | buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "Zap Gremlins" */; 135 | buildPhases = ( 136 | 8D5B49AF048680CD000E48DA /* Resources */, 137 | 8D5B49B1048680CD000E48DA /* Sources */, 138 | 8D5B49B3048680CD000E48DA /* Frameworks */, 139 | ); 140 | buildRules = ( 141 | ); 142 | dependencies = ( 143 | ); 144 | name = "Zap Gremlins"; 145 | productInstallPath = "$(HOME)/Library/Bundles"; 146 | productName = "Zap Gremlins"; 147 | productReference = 8D5B49B6048680CD000E48DA /* Zap Gremlins.codasidebar */; 148 | productType = "com.apple.product-type.bundle"; 149 | }; 150 | /* End PBXNativeTarget section */ 151 | 152 | /* Begin PBXProject section */ 153 | 089C1669FE841209C02AAC07 /* Project object */ = { 154 | isa = PBXProject; 155 | attributes = { 156 | LastUpgradeCheck = 0430; 157 | }; 158 | buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "Zap Gremlins" */; 159 | compatibilityVersion = "Xcode 3.2"; 160 | developmentRegion = English; 161 | hasScannedForEncodings = 1; 162 | knownRegions = ( 163 | en, 164 | ); 165 | mainGroup = 089C166AFE841209C02AAC07 /* Zap Gremlins */; 166 | projectDirPath = ""; 167 | projectRoot = ""; 168 | targets = ( 169 | 8D5B49AC048680CD000E48DA /* Zap Gremlins */, 170 | ); 171 | }; 172 | /* End PBXProject section */ 173 | 174 | /* Begin PBXResourcesBuildPhase section */ 175 | 8D5B49AF048680CD000E48DA /* Resources */ = { 176 | isa = PBXResourcesBuildPhase; 177 | buildActionMask = 2147483647; 178 | files = ( 179 | 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */, 180 | BEAA0F3C0EB125CD002630D0 /* Localizable.strings in Resources */, 181 | BEAA0D4F0EB0F2B6002630D0 /* ZapDialog.nib in Resources */, 182 | 18A8C99E174D8CF300C9AC29 /* gizmo.pdf in Resources */, 183 | ); 184 | runOnlyForDeploymentPostprocessing = 0; 185 | }; 186 | /* End PBXResourcesBuildPhase section */ 187 | 188 | /* Begin PBXSourcesBuildPhase section */ 189 | 8D5B49B1048680CD000E48DA /* Sources */ = { 190 | isa = PBXSourcesBuildPhase; 191 | buildActionMask = 2147483647; 192 | files = ( 193 | 18B4AC38174AE821001B5315 /* ZapPlugInViewController.m in Sources */, 194 | 18C79B59176139D100BB3AB6 /* ZapPlugIn.m in Sources */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXSourcesBuildPhase section */ 199 | 200 | /* Begin PBXVariantGroup section */ 201 | 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { 202 | isa = PBXVariantGroup; 203 | children = ( 204 | 089C167EFE841241C02AAC07 /* English */, 205 | ); 206 | name = InfoPlist.strings; 207 | sourceTree = ""; 208 | }; 209 | BEAA0D4D0EB0F2B6002630D0 /* ZapDialog.nib */ = { 210 | isa = PBXVariantGroup; 211 | children = ( 212 | BEAA0D4E0EB0F2B6002630D0 /* English */, 213 | ); 214 | name = ZapDialog.nib; 215 | sourceTree = ""; 216 | }; 217 | BEAA0F3B0EB125CD002630D0 /* Localizable.strings */ = { 218 | isa = PBXVariantGroup; 219 | children = ( 220 | BEAA0D460EB0F0BC002630D0 /* English */, 221 | ); 222 | name = Localizable.strings; 223 | sourceTree = ""; 224 | }; 225 | /* End PBXVariantGroup section */ 226 | 227 | /* Begin XCBuildConfiguration section */ 228 | 1DEB913B08733D840010E9CD /* Debug */ = { 229 | isa = XCBuildConfiguration; 230 | buildSettings = { 231 | ALWAYS_SEARCH_USER_PATHS = NO; 232 | COPY_PHASE_STRIP = NO; 233 | GCC_DYNAMIC_NO_PIC = NO; 234 | GCC_OPTIMIZATION_LEVEL = 0; 235 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 236 | GCC_PREFIX_HEADER = "Zap Gremlins_Prefix.pch"; 237 | INFOPLIST_FILE = Info.plist; 238 | INSTALL_PATH = "$(HOME)/Library/Bundles"; 239 | PRODUCT_NAME = "Zap Gremlins"; 240 | WRAPPER_EXTENSION = codasidebar; 241 | }; 242 | name = Debug; 243 | }; 244 | 1DEB913C08733D840010E9CD /* Release */ = { 245 | isa = XCBuildConfiguration; 246 | buildSettings = { 247 | ALWAYS_SEARCH_USER_PATHS = NO; 248 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 249 | GCC_PREFIX_HEADER = "Zap Gremlins_Prefix.pch"; 250 | INFOPLIST_FILE = Info.plist; 251 | INSTALL_PATH = "$(HOME)/Library/Bundles"; 252 | PRODUCT_NAME = "Zap Gremlins"; 253 | WRAPPER_EXTENSION = codasidebar; 254 | }; 255 | name = Release; 256 | }; 257 | 1DEB913F08733D840010E9CD /* Debug */ = { 258 | isa = XCBuildConfiguration; 259 | buildSettings = { 260 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; 261 | GCC_C_LANGUAGE_STANDARD = c99; 262 | GCC_OPTIMIZATION_LEVEL = 0; 263 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 264 | GCC_WARN_UNUSED_VARIABLE = YES; 265 | ONLY_ACTIVE_ARCH = YES; 266 | SDKROOT = macosx10.7; 267 | }; 268 | name = Debug; 269 | }; 270 | 1DEB914008733D840010E9CD /* Release */ = { 271 | isa = XCBuildConfiguration; 272 | buildSettings = { 273 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; 274 | GCC_C_LANGUAGE_STANDARD = c99; 275 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 276 | GCC_WARN_UNUSED_VARIABLE = YES; 277 | SDKROOT = macosx10.7; 278 | }; 279 | name = Release; 280 | }; 281 | /* End XCBuildConfiguration section */ 282 | 283 | /* Begin XCConfigurationList section */ 284 | 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "Zap Gremlins" */ = { 285 | isa = XCConfigurationList; 286 | buildConfigurations = ( 287 | 1DEB913B08733D840010E9CD /* Debug */, 288 | 1DEB913C08733D840010E9CD /* Release */, 289 | ); 290 | defaultConfigurationIsVisible = 0; 291 | defaultConfigurationName = Release; 292 | }; 293 | 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "Zap Gremlins" */ = { 294 | isa = XCConfigurationList; 295 | buildConfigurations = ( 296 | 1DEB913F08733D840010E9CD /* Debug */, 297 | 1DEB914008733D840010E9CD /* Release */, 298 | ); 299 | defaultConfigurationIsVisible = 0; 300 | defaultConfigurationName = Release; 301 | }; 302 | /* End XCConfigurationList section */ 303 | }; 304 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 305 | } 306 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/Zap Gremlins.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/Zap Gremlins.xcodeproj/project.xcworkspace/xcuserdata/wade.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Zap Gremlins Sidebar/Zap Gremlins.xcodeproj/project.xcworkspace/xcuserdata/wade.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/Zap Gremlins.xcodeproj/project.xcworkspace/xcuserdata/will.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Zap Gremlins Sidebar/Zap Gremlins.xcodeproj/project.xcworkspace/xcuserdata/will.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/Zap Gremlins.xcodeproj/project.xcworkspace/xcuserdata/will.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/Zap Gremlins.xcodeproj/xcuserdata/wade.xcuserdatad/xcschemes/Zap Gremlins.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/Zap Gremlins.xcodeproj/xcuserdata/wade.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Zap Gremlins.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8D5B49AC048680CD000E48DA 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/Zap Gremlins_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Zap Gremlins' target in the 'Zap Gremlins' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/ZapPlugIn.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZapPlugIn.h 3 | // Zap Gremlins 4 | // 5 | // Created by Wade Cosgrove on 6/6/13. 6 | // 7 | // 8 | 9 | #import 10 | #import "CodaPlugInsController.h" 11 | 12 | @interface ZapPlugIn : NSObject 13 | { 14 | CodaPlugInsController *_pluginController; 15 | id _plugInBundle; 16 | } 17 | 18 | - (id)initWithPlugInController:(CodaPlugInsController*)aController plugInBundle:(id )plugInBundle; 19 | 20 | - (NSViewController*)viewController; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/ZapPlugIn.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZapPlugIn.m 3 | // Zap Gremlins 4 | // 5 | // Created by Wade Cosgrove on 6/6/13. 6 | // 7 | // 8 | 9 | #import "ZapPlugIn.h" 10 | #import "ZapPlugInViewController.h" 11 | 12 | @implementation ZapPlugIn 13 | 14 | 15 | - (id)initWithPlugInController:(CodaPlugInsController*)aController plugInBundle:(id )plugInBundle 16 | { 17 | self = [super init]; 18 | 19 | if ( self ) 20 | { 21 | _pluginController = [aController retain]; 22 | _plugInBundle = [plugInBundle retain]; 23 | } 24 | 25 | return self; 26 | } 27 | 28 | 29 | - (void)dealloc 30 | { 31 | [_plugInBundle release]; 32 | [_pluginController release]; 33 | 34 | [super dealloc]; 35 | } 36 | 37 | 38 | - (NSString*)name 39 | { 40 | return @"Gremlins"; 41 | } 42 | 43 | 44 | - (NSViewController*)viewController 45 | { 46 | return [[[ZapPlugInViewController alloc] initWithNibName:@"ZapDialog" plugInBundle:_plugInBundle plugInController:_pluginController] autorelease]; 47 | } 48 | 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/ZapPlugInViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZapPlugInViewController.h 3 | // Zap Gremlins 4 | // 5 | // Created by Wade Cosgrove on 5/20/13. 6 | // 7 | // 8 | 9 | #import 10 | #import "CodaPluginsController.h" 11 | 12 | 13 | @interface ZapPlugInViewController : NSViewController 14 | { 15 | CodaPlugInsController *pluginController; 16 | 17 | IBOutlet NSButton *illegalCheckbox; 18 | IBOutlet NSTextField *replaceField; 19 | 20 | BOOL zapControl; 21 | BOOL zapNonAscii; 22 | BOOL zapNull; 23 | BOOL zapIllegal; 24 | NSInteger replaceZapTag; 25 | } 26 | 27 | - (id)initWithNibName:(NSString*)nibName plugInBundle:(id )plugInBundle plugInController:(CodaPlugInsController*)aController; 28 | 29 | @property (assign) CodaPlugInsController *pluginController; 30 | @property (assign) BOOL zapControl; 31 | @property (assign) BOOL zapNonAscii; 32 | @property (assign) BOOL zapNull; 33 | @property (assign) BOOL zapIllegal; 34 | @property (assign) NSInteger replaceZapTag; 35 | 36 | - (IBAction)zapAction:(id)sender; 37 | 38 | @end 39 | 40 | 41 | @interface NSMutableString (NSCharacterSetReplacement) 42 | 43 | - (void)replaceCharactersInSet:(NSCharacterSet *)charSet withString:(NSString*)aString; 44 | - (void)replaceCharactersInSetWithHexCodes:(NSCharacterSet *)charSet; 45 | 46 | @end -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/ZapPlugInViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZapPlugInViewController.m 3 | // Zap Gremlins 4 | // 5 | // Created by Wade Cosgrove on 5/20/13. 6 | // 7 | // 8 | 9 | #import "ZapPlugInViewController.h" 10 | #import "CodaPlugInsController.h" 11 | #import 12 | 13 | @implementation ZapPlugInViewController 14 | 15 | @synthesize pluginController; 16 | @synthesize zapControl; 17 | @synthesize zapNonAscii; 18 | @synthesize zapNull; 19 | @synthesize zapIllegal; 20 | @synthesize replaceZapTag; 21 | 22 | 23 | - (id)initWithNibName:(NSString*)nibName plugInBundle:(id )plugInBundle plugInController:(CodaPlugInsController*)aController 24 | { 25 | self = [super initWithNibName:nibName bundle:plugInBundle]; 26 | if (self) 27 | { 28 | self.pluginController = aController; 29 | 30 | //set default zapper values that are bound in UI 31 | 32 | self.zapControl = YES; 33 | self.zapNonAscii = NO; 34 | self.zapNull = YES; 35 | self.zapIllegal = YES; 36 | self.replaceZapTag = 1; 37 | } 38 | 39 | return self; 40 | } 41 | 42 | 43 | - (IBAction)zapAction:(id)sender 44 | { 45 | CodaTextView *textView = [self.pluginController focusedTextView:self]; 46 | NSString *text = nil; 47 | BOOL replacingSelection = YES; 48 | NSMutableString *resultText = nil; 49 | 50 | if ( textView ) 51 | { 52 | //check to see if there is a selection and zap only that, else zap entire document 53 | text = [textView selectedText]; 54 | 55 | if ( [text isEqualToString:@""] ) 56 | { 57 | text = [textView string]; 58 | replacingSelection = NO; 59 | } 60 | 61 | if ( text != nil ) 62 | { 63 | resultText = [NSMutableString stringWithString:text]; 64 | NSString *replacementText = nil; 65 | 66 | switch ( replaceZapTag ) 67 | { 68 | case 1: 69 | replacementText = @""; //delete characters 70 | break; 71 | case 2: 72 | replacementText = nil; //replace with hex code 73 | break; 74 | default: 75 | replacementText = [replaceField stringValue]; //replace with specific string 76 | } 77 | 78 | if ( zapControl ) 79 | { 80 | if ( replacementText ) 81 | [resultText replaceCharactersInSet:[NSCharacterSet controlCharacterSet] withString:replacementText]; 82 | else 83 | [resultText replaceCharactersInSetWithHexCodes:[NSCharacterSet controlCharacterSet]]; 84 | } 85 | 86 | if ( zapNonAscii ) 87 | { 88 | NSCharacterSet *ascii = [NSCharacterSet characterSetWithRange:NSMakeRange(0, 128)]; 89 | NSCharacterSet *nonAscii = [ascii invertedSet]; 90 | 91 | if ( replacementText ) 92 | [resultText replaceCharactersInSet:nonAscii withString:replacementText]; 93 | else 94 | [resultText replaceCharactersInSetWithHexCodes:nonAscii]; 95 | } 96 | 97 | if ( zapNull ) 98 | { 99 | NSCharacterSet *nullCharSet = [NSCharacterSet characterSetWithRange:NSMakeRange(0, 1)]; 100 | 101 | if ( replacementText ) 102 | [resultText replaceCharactersInSet:nullCharSet withString:replacementText]; 103 | else 104 | [resultText replaceCharactersInSetWithHexCodes:nullCharSet]; 105 | } 106 | 107 | if ( zapIllegal ) 108 | { 109 | if ( replacementText ) 110 | [resultText replaceCharactersInSet:[NSCharacterSet illegalCharacterSet] withString:replacementText]; 111 | else 112 | [resultText replaceCharactersInSetWithHexCodes:[NSCharacterSet illegalCharacterSet]]; 113 | } 114 | 115 | if ( replacingSelection ) 116 | { 117 | //replaces the selected text 118 | [textView insertText:resultText]; 119 | } 120 | else 121 | { 122 | //replace the entire text buffer 123 | [textView replaceCharactersInRange:NSMakeRange(0, [text length]) withString:resultText]; 124 | } 125 | } 126 | } 127 | } 128 | 129 | @end 130 | 131 | 132 | @implementation NSMutableString (NSCharacterSetReplacement) 133 | 134 | - (void)replaceCharactersInSet:(NSCharacterSet*)charSet withString:(NSString*)aString 135 | { 136 | NSRange range = NSMakeRange(0, [self length]); 137 | 138 | if ( aString == nil ) 139 | aString = @""; 140 | 141 | while( range.location != NSNotFound ) 142 | { 143 | range = [self rangeOfCharacterFromSet:charSet options:0 range:range]; 144 | 145 | if ( range.location != NSNotFound ) 146 | { 147 | [self replaceCharactersInRange:range withString:aString]; 148 | 149 | //adjust remaining length 150 | NSRange remainingRange; 151 | 152 | remainingRange.length = [self length] - (range.location + [aString length]); 153 | remainingRange.location = range.location + [aString length]; 154 | 155 | range = remainingRange; 156 | } 157 | } 158 | } 159 | 160 | 161 | - (void)replaceCharactersInSetWithHexCodes:(NSCharacterSet *)charSet 162 | { 163 | NSRange range = NSMakeRange(0, [self length]); 164 | unichar curChar; 165 | NSString *formattedChar = @"\\0x%X"; 166 | NSString *hexString = nil; 167 | 168 | while( range.location != NSNotFound ) 169 | { 170 | range = [self rangeOfCharacterFromSet:charSet options:0 range:range]; 171 | 172 | if ( range.location != NSNotFound ) 173 | { 174 | //convert found char to hex character code 175 | curChar = [self characterAtIndex:range.location]; 176 | hexString = [NSString stringWithFormat:formattedChar, curChar]; 177 | 178 | [self replaceCharactersInRange:range withString:hexString]; 179 | 180 | //adjust remaining length 181 | NSRange remainingRange; 182 | 183 | remainingRange.length = [self length] - (range.location + [hexString length]); 184 | remainingRange.location = range.location + [hexString length]; 185 | 186 | range = remainingRange; 187 | } 188 | } 189 | } 190 | 191 | @end 192 | 193 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins Sidebar/gizmo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Zap Gremlins Sidebar/gizmo.pdf -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Zap Gremlins/English.lproj/Localizable.strings -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins/English.lproj/ZapDialog.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Zap Gremlins/English.lproj/ZapDialog.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.panic.plugin.ZapGremlins 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.2 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | CodaAuthorString 26 | Panic Inc. 27 | CodaDescriptionString 28 | Removes Unprintable Characters 29 | CodaIconMaskTintString 30 | #01CEEF 31 | CodaPlugInMinimumAPIVersion 32 | 5 33 | CodaPlugInSupportedAPIVersion 34 | 6 35 | NSHumanReadableCopyright 36 | Panic Inc. 37 | NSPrincipalClass 38 | ZapPlugIn 39 | LSMinimumSystemVersion 40 | 10.7 41 | 42 | 43 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins/Zap Gremlins.xcodeproj/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Cocoa Plug-ins/Zap Gremlins/Zap Gremlins.xcodeproj/TemplateIcon.icns -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins/Zap Gremlins.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; 11 | BEAA0D340EB0F00F002630D0 /* ZapPlugIn.m in Sources */ = {isa = PBXBuildFile; fileRef = BEAA0D320EB0F00F002630D0 /* ZapPlugIn.m */; }; 12 | BEAA0D4F0EB0F2B6002630D0 /* ZapDialog.nib in Resources */ = {isa = PBXBuildFile; fileRef = BEAA0D4D0EB0F2B6002630D0 /* ZapDialog.nib */; }; 13 | BEAA0F3C0EB125CD002630D0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = BEAA0F3B0EB125CD002630D0 /* Localizable.strings */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 18 | 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 19 | 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 20 | 32DBCF630370AF2F00C91783 /* Zap Gremlins_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Zap Gremlins_Prefix.pch"; sourceTree = ""; }; 21 | 8D5B49B6048680CD000E48DA /* Zap Gremlins.codaplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Zap Gremlins.codaplugin"; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 23 | BEAA0D320EB0F00F002630D0 /* ZapPlugIn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZapPlugIn.m; sourceTree = ""; }; 24 | BEAA0D330EB0F00F002630D0 /* ZapPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZapPlugIn.h; sourceTree = ""; }; 25 | BEAA0D3B0EB0F06F002630D0 /* CodaPlugInsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodaPlugInsController.h; path = ../CodaPlugInsController.h; sourceTree = SOURCE_ROOT; }; 26 | BEAA0D460EB0F0BC002630D0 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = ""; }; 27 | BEAA0D4E0EB0F2B6002630D0 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/ZapDialog.nib; sourceTree = ""; }; 28 | D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 8D5B49B3048680CD000E48DA /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 089C166AFE841209C02AAC07 /* Zap Gremlins */ = { 44 | isa = PBXGroup; 45 | children = ( 46 | 08FB77AFFE84173DC02AAC07 /* Classes */, 47 | 32C88E010371C26100C91783 /* Other Sources */, 48 | 089C167CFE841241C02AAC07 /* Resources */, 49 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, 50 | 19C28FB8FE9D52D311CA2CBB /* Products */, 51 | ); 52 | name = "Zap Gremlins"; 53 | sourceTree = ""; 54 | }; 55 | 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */, 59 | 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */, 60 | ); 61 | name = "Frameworks and Libraries"; 62 | sourceTree = ""; 63 | }; 64 | 089C167CFE841241C02AAC07 /* Resources */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 8D5B49B7048680CD000E48DA /* Info.plist */, 68 | BEAA0F3B0EB125CD002630D0 /* Localizable.strings */, 69 | BEAA0D4D0EB0F2B6002630D0 /* ZapDialog.nib */, 70 | ); 71 | name = Resources; 72 | sourceTree = ""; 73 | }; 74 | 08FB77AFFE84173DC02AAC07 /* Classes */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | BEAA0D3B0EB0F06F002630D0 /* CodaPlugInsController.h */, 78 | BEAA0D330EB0F00F002630D0 /* ZapPlugIn.h */, 79 | BEAA0D320EB0F00F002630D0 /* ZapPlugIn.m */, 80 | ); 81 | name = Classes; 82 | sourceTree = ""; 83 | }; 84 | 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */, 88 | ); 89 | name = "Linked Frameworks"; 90 | sourceTree = ""; 91 | }; 92 | 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 089C167FFE841241C02AAC07 /* AppKit.framework */, 96 | D2F7E65807B2D6F200F64583 /* CoreData.framework */, 97 | 089C1672FE841209C02AAC07 /* Foundation.framework */, 98 | ); 99 | name = "Other Frameworks"; 100 | sourceTree = ""; 101 | }; 102 | 19C28FB8FE9D52D311CA2CBB /* Products */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 8D5B49B6048680CD000E48DA /* Zap Gremlins.codaplugin */, 106 | ); 107 | name = Products; 108 | sourceTree = ""; 109 | }; 110 | 32C88E010371C26100C91783 /* Other Sources */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 32DBCF630370AF2F00C91783 /* Zap Gremlins_Prefix.pch */, 114 | ); 115 | name = "Other Sources"; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXNativeTarget section */ 121 | 8D5B49AC048680CD000E48DA /* Zap Gremlins */ = { 122 | isa = PBXNativeTarget; 123 | buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "Zap Gremlins" */; 124 | buildPhases = ( 125 | 8D5B49AF048680CD000E48DA /* Resources */, 126 | 8D5B49B1048680CD000E48DA /* Sources */, 127 | 8D5B49B3048680CD000E48DA /* Frameworks */, 128 | ); 129 | buildRules = ( 130 | ); 131 | dependencies = ( 132 | ); 133 | name = "Zap Gremlins"; 134 | productInstallPath = "$(HOME)/Library/Bundles"; 135 | productName = "Zap Gremlins"; 136 | productReference = 8D5B49B6048680CD000E48DA /* Zap Gremlins.codaplugin */; 137 | productType = "com.apple.product-type.bundle"; 138 | }; 139 | /* End PBXNativeTarget section */ 140 | 141 | /* Begin PBXProject section */ 142 | 089C1669FE841209C02AAC07 /* Project object */ = { 143 | isa = PBXProject; 144 | attributes = { 145 | LastUpgradeCheck = 0640; 146 | }; 147 | buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "Zap Gremlins" */; 148 | compatibilityVersion = "Xcode 3.2"; 149 | developmentRegion = English; 150 | hasScannedForEncodings = 1; 151 | knownRegions = ( 152 | en, 153 | ); 154 | mainGroup = 089C166AFE841209C02AAC07 /* Zap Gremlins */; 155 | projectDirPath = ""; 156 | projectRoot = ""; 157 | targets = ( 158 | 8D5B49AC048680CD000E48DA /* Zap Gremlins */, 159 | ); 160 | }; 161 | /* End PBXProject section */ 162 | 163 | /* Begin PBXResourcesBuildPhase section */ 164 | 8D5B49AF048680CD000E48DA /* Resources */ = { 165 | isa = PBXResourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | BEAA0F3C0EB125CD002630D0 /* Localizable.strings in Resources */, 169 | BEAA0D4F0EB0F2B6002630D0 /* ZapDialog.nib in Resources */, 170 | ); 171 | runOnlyForDeploymentPostprocessing = 0; 172 | }; 173 | /* End PBXResourcesBuildPhase section */ 174 | 175 | /* Begin PBXSourcesBuildPhase section */ 176 | 8D5B49B1048680CD000E48DA /* Sources */ = { 177 | isa = PBXSourcesBuildPhase; 178 | buildActionMask = 2147483647; 179 | files = ( 180 | BEAA0D340EB0F00F002630D0 /* ZapPlugIn.m in Sources */, 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | }; 184 | /* End PBXSourcesBuildPhase section */ 185 | 186 | /* Begin PBXVariantGroup section */ 187 | BEAA0D4D0EB0F2B6002630D0 /* ZapDialog.nib */ = { 188 | isa = PBXVariantGroup; 189 | children = ( 190 | BEAA0D4E0EB0F2B6002630D0 /* English */, 191 | ); 192 | name = ZapDialog.nib; 193 | sourceTree = ""; 194 | }; 195 | BEAA0F3B0EB125CD002630D0 /* Localizable.strings */ = { 196 | isa = PBXVariantGroup; 197 | children = ( 198 | BEAA0D460EB0F0BC002630D0 /* English */, 199 | ); 200 | name = Localizable.strings; 201 | sourceTree = ""; 202 | }; 203 | /* End PBXVariantGroup section */ 204 | 205 | /* Begin XCBuildConfiguration section */ 206 | 1DEB913B08733D840010E9CD /* Debug */ = { 207 | isa = XCBuildConfiguration; 208 | buildSettings = { 209 | ALWAYS_SEARCH_USER_PATHS = NO; 210 | COMBINE_HIDPI_IMAGES = YES; 211 | COPY_PHASE_STRIP = NO; 212 | GCC_DYNAMIC_NO_PIC = NO; 213 | GCC_OPTIMIZATION_LEVEL = 0; 214 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 215 | GCC_PREFIX_HEADER = "Zap Gremlins_Prefix.pch"; 216 | INFOPLIST_FILE = Info.plist; 217 | INSTALL_PATH = "$(HOME)/Library/Application Support/Coda/PlugIns"; 218 | MACOSX_DEPLOYMENT_TARGET = 10.7; 219 | PRODUCT_NAME = "Zap Gremlins"; 220 | WRAPPER_EXTENSION = codaplugin; 221 | }; 222 | name = Debug; 223 | }; 224 | 1DEB913C08733D840010E9CD /* Release */ = { 225 | isa = XCBuildConfiguration; 226 | buildSettings = { 227 | ALWAYS_SEARCH_USER_PATHS = NO; 228 | COMBINE_HIDPI_IMAGES = YES; 229 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 230 | GCC_PREFIX_HEADER = "Zap Gremlins_Prefix.pch"; 231 | INFOPLIST_FILE = Info.plist; 232 | INSTALL_PATH = "$(HOME)/Library/Application Support/Coda/PlugIns"; 233 | MACOSX_DEPLOYMENT_TARGET = 10.7; 234 | PRODUCT_NAME = "Zap Gremlins"; 235 | WRAPPER_EXTENSION = codaplugin; 236 | }; 237 | name = Release; 238 | }; 239 | 1DEB913F08733D840010E9CD /* Debug */ = { 240 | isa = XCBuildConfiguration; 241 | buildSettings = { 242 | GCC_C_LANGUAGE_STANDARD = c99; 243 | GCC_OPTIMIZATION_LEVEL = 0; 244 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 245 | GCC_WARN_UNUSED_VARIABLE = YES; 246 | MACOSX_DEPLOYMENT_TARGET = 10.7; 247 | ONLY_ACTIVE_ARCH = YES; 248 | }; 249 | name = Debug; 250 | }; 251 | 1DEB914008733D840010E9CD /* Release */ = { 252 | isa = XCBuildConfiguration; 253 | buildSettings = { 254 | GCC_C_LANGUAGE_STANDARD = c99; 255 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 256 | GCC_WARN_UNUSED_VARIABLE = YES; 257 | MACOSX_DEPLOYMENT_TARGET = 10.7; 258 | }; 259 | name = Release; 260 | }; 261 | /* End XCBuildConfiguration section */ 262 | 263 | /* Begin XCConfigurationList section */ 264 | 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "Zap Gremlins" */ = { 265 | isa = XCConfigurationList; 266 | buildConfigurations = ( 267 | 1DEB913B08733D840010E9CD /* Debug */, 268 | 1DEB913C08733D840010E9CD /* Release */, 269 | ); 270 | defaultConfigurationIsVisible = 0; 271 | defaultConfigurationName = Release; 272 | }; 273 | 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "Zap Gremlins" */ = { 274 | isa = XCConfigurationList; 275 | buildConfigurations = ( 276 | 1DEB913F08733D840010E9CD /* Debug */, 277 | 1DEB914008733D840010E9CD /* Release */, 278 | ); 279 | defaultConfigurationIsVisible = 0; 280 | defaultConfigurationName = Release; 281 | }; 282 | /* End XCConfigurationList section */ 283 | }; 284 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 285 | } 286 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins/Zap Gremlins_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Zap Gremlins' target in the 'Zap Gremlins' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins/ZapPlugIn.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CodaPluginsController.h" 3 | 4 | @class CodaPlugInsController; 5 | 6 | @interface ZapPlugIn : NSObject 7 | { 8 | CodaPlugInsController *controller; 9 | IBOutlet NSWindow *zapDialog; 10 | IBOutlet NSButton *illegalCheckbox; 11 | 12 | BOOL zapControl; 13 | BOOL zapNonAscii; 14 | BOOL zapNull; 15 | BOOL zapIllegal; 16 | NSInteger replaceZapTag; 17 | 18 | IBOutlet NSTextField *replaceField; 19 | 20 | } 21 | 22 | @property (assign) BOOL zapControl; 23 | @property (assign) BOOL zapNonAscii; 24 | @property (assign) BOOL zapNull; 25 | @property (assign) BOOL zapIllegal; 26 | @property (assign) NSInteger replaceZapTag; 27 | 28 | /* required coda plugin methods */ 29 | 30 | //for Coda 2.0.1 and higher 31 | - (id)initWithPlugInController:(CodaPlugInsController *)aController plugInBundle:(NSObject *)plugInBundle; 32 | 33 | //for Coda 2.0 and lower 34 | - (id)initWithPlugInController:(CodaPlugInsController*)aController bundle:(NSBundle*)yourBundle; 35 | 36 | - (NSString*)name; 37 | 38 | /* actions */ 39 | - (IBAction)cancelAction:(id)sender; 40 | - (IBAction)zapAction:(id)sender; 41 | 42 | @end 43 | 44 | 45 | @interface NSMutableString (NSCharacterSetReplacement) 46 | 47 | - (void)replaceCharactersInSet:(NSCharacterSet *)charSet withString:(NSString*)aString; 48 | - (void)replaceCharactersInSetWithHexCodes:(NSCharacterSet *)charSet; 49 | 50 | @end -------------------------------------------------------------------------------- /Cocoa Plug-ins/Zap Gremlins/ZapPlugIn.m: -------------------------------------------------------------------------------- 1 | #import "ZapPlugIn.h" 2 | #import "CodaPlugInsController.h" 3 | 4 | @interface ZapPlugIn () 5 | 6 | - (id)initWithController:(CodaPlugInsController*)aController; 7 | - (void)loadInterface; 8 | 9 | @end 10 | 11 | @implementation ZapPlugIn 12 | 13 | @synthesize zapControl; 14 | @synthesize zapNonAscii; 15 | @synthesize zapNull; 16 | @synthesize zapIllegal; 17 | @synthesize replaceZapTag; 18 | 19 | 20 | #pragma mark Required Coda Plugin Methods 21 | 22 | 23 | // Support for Coda 2.0 and lower 24 | 25 | - (id)initWithPlugInController:(CodaPlugInsController*)aController bundle:(NSBundle*)yourBundle 26 | { 27 | return [self initWithController:aController]; 28 | } 29 | 30 | // Support for Coda 2.0.1 and higher 31 | // NOTE: must set the CodaPlugInSupportedAPIVersion key to 6 or above to use this init method 32 | 33 | - (id)initWithPlugInController:(CodaPlugInsController*)aController plugInBundle:(NSObject *)plugInBundle 34 | { 35 | return [self initWithController:aController]; 36 | } 37 | 38 | 39 | - (id)initWithController:(CodaPlugInsController*)aController 40 | { 41 | if ( (self = [super init]) != nil ) 42 | { 43 | //store controller pointer 44 | controller = aController; 45 | 46 | //add menu item in Coda 47 | [controller registerActionWithTitle:NSLocalizedString(@"Zap Gremlins...", @"") target:self selector:@selector(showDialog)]; 48 | } 49 | 50 | return self; 51 | } 52 | 53 | 54 | - (NSString*)name 55 | { 56 | return @"Zap Gremlins"; 57 | } 58 | 59 | - (void)loadInterface 60 | { 61 | [NSBundle loadNibNamed:@"ZapDialog" owner:self]; 62 | 63 | //set default zapper values that are bound in UI 64 | 65 | self.zapControl = YES; 66 | self.zapNonAscii = NO; 67 | self.zapNull = YES; 68 | self.zapIllegal = YES; 69 | self.replaceZapTag = 1; 70 | } 71 | 72 | #pragma mark Show and Close Sheet 73 | 74 | - (void)showDialog 75 | { 76 | if ( zapDialog == nil ) 77 | { 78 | //lazy load nib to avoid making Coda slow to launch 79 | [self loadInterface]; 80 | } 81 | 82 | CodaTextView *textView = [controller focusedTextView]; 83 | NSWindow *window = [textView window]; 84 | 85 | [zapDialog makeFirstResponder:illegalCheckbox]; 86 | 87 | if ( window && ![window attachedSheet] ) 88 | [NSApp beginSheet:zapDialog modalForWindow:window modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:nil]; 89 | else 90 | NSBeep(); 91 | } 92 | 93 | 94 | - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo 95 | { 96 | //process zap gremlins after sheet closes 97 | 98 | if ( returnCode == NSOKButton ) 99 | { 100 | CodaTextView *textView = [controller focusedTextView]; 101 | NSString *text = nil; 102 | BOOL replacingSelection = YES; 103 | NSMutableString *resultText = nil; 104 | 105 | if ( textView ) 106 | { 107 | //check to see if there is a selection and zap only that, else zap entire document 108 | text = [textView selectedText]; 109 | 110 | if ( [text isEqualToString:@""] ) 111 | { 112 | text = [textView string]; 113 | replacingSelection = NO; 114 | } 115 | 116 | if ( text != nil ) 117 | { 118 | resultText = [NSMutableString stringWithString:text]; 119 | NSString *replacementText = nil; 120 | 121 | switch ( replaceZapTag ) 122 | { 123 | case 1: 124 | replacementText = @""; //delete characters 125 | break; 126 | case 2: 127 | replacementText = nil; //replace with hex code 128 | break; 129 | default: 130 | replacementText = [replaceField stringValue]; //replace with specific string 131 | } 132 | 133 | if ( zapControl ) 134 | { 135 | if ( replacementText ) 136 | [resultText replaceCharactersInSet:[NSCharacterSet controlCharacterSet] withString:replacementText]; 137 | else 138 | [resultText replaceCharactersInSetWithHexCodes:[NSCharacterSet controlCharacterSet]]; 139 | } 140 | 141 | if ( zapNonAscii ) 142 | { 143 | NSCharacterSet *ascii = [NSCharacterSet characterSetWithRange:NSMakeRange(0, 128)]; 144 | NSCharacterSet *nonAscii = [ascii invertedSet]; 145 | 146 | if ( replacementText ) 147 | [resultText replaceCharactersInSet:nonAscii withString:replacementText]; 148 | else 149 | [resultText replaceCharactersInSetWithHexCodes:nonAscii]; 150 | } 151 | 152 | if ( zapNull ) 153 | { 154 | NSCharacterSet *nullCharSet = [NSCharacterSet characterSetWithRange:NSMakeRange(0, 1)]; 155 | 156 | if ( replacementText ) 157 | [resultText replaceCharactersInSet:nullCharSet withString:replacementText]; 158 | else 159 | [resultText replaceCharactersInSetWithHexCodes:nullCharSet]; 160 | } 161 | 162 | if ( zapIllegal ) 163 | { 164 | if ( replacementText ) 165 | [resultText replaceCharactersInSet:[NSCharacterSet illegalCharacterSet] withString:replacementText]; 166 | else 167 | [resultText replaceCharactersInSetWithHexCodes:[NSCharacterSet illegalCharacterSet]]; 168 | } 169 | 170 | if ( replacingSelection ) 171 | { 172 | //replaces the selected text 173 | [textView insertText:resultText]; 174 | } 175 | else 176 | { 177 | //replace the entire text buffer 178 | [textView replaceCharactersInRange:NSMakeRange(0, [text length]) withString:resultText]; 179 | } 180 | } 181 | } 182 | } 183 | 184 | [sheet close]; 185 | } 186 | 187 | 188 | #pragma mark Actions 189 | 190 | - (IBAction)cancelAction:(id)sender 191 | { 192 | [NSApp endSheet:zapDialog returnCode:NSCancelButton]; 193 | } 194 | 195 | 196 | - (IBAction)zapAction:(id)sender 197 | { 198 | [NSApp endSheet:zapDialog returnCode:NSOKButton]; 199 | } 200 | 201 | 202 | #pragma mark Menu Validation 203 | 204 | - (BOOL)validateMenuItem:(NSMenuItem*)aMenuItem 205 | { 206 | BOOL result = YES; 207 | SEL action = [aMenuItem action]; 208 | 209 | if ( action == @selector(showDialog) ) 210 | { 211 | CodaTextView *textView = [controller focusedTextView]; 212 | 213 | // if a text view is not visible, we can't zap gremlins 214 | if ( textView == nil ) 215 | result = NO; 216 | } 217 | 218 | return result; 219 | } 220 | 221 | 222 | #pragma mark Clean-up 223 | 224 | - (void)dealloc 225 | { 226 | [zapDialog release]; 227 | 228 | [super dealloc]; 229 | } 230 | 231 | @end 232 | 233 | 234 | @implementation NSMutableString (NSCharacterSetReplacement) 235 | 236 | - (void)replaceCharactersInSet:(NSCharacterSet*)charSet withString:(NSString*)aString 237 | { 238 | NSRange range = NSMakeRange(0, [self length]); 239 | 240 | if ( aString == nil ) 241 | aString = @""; 242 | 243 | while( range.location != NSNotFound ) 244 | { 245 | range = [self rangeOfCharacterFromSet:charSet options:0 range:range]; 246 | 247 | if ( range.location != NSNotFound ) 248 | { 249 | [self replaceCharactersInRange:range withString:aString]; 250 | 251 | //adjust remaining length 252 | NSRange remainingRange; 253 | 254 | remainingRange.length = [self length] - (range.location + [aString length]); 255 | remainingRange.location = range.location + [aString length]; 256 | 257 | range = remainingRange; 258 | } 259 | } 260 | } 261 | 262 | 263 | - (void)replaceCharactersInSetWithHexCodes:(NSCharacterSet *)charSet 264 | { 265 | NSRange range = NSMakeRange(0, [self length]); 266 | unichar curChar; 267 | NSString *formattedChar = @"\\0x%X"; 268 | NSString *hexString = nil; 269 | 270 | while( range.location != NSNotFound ) 271 | { 272 | range = [self rangeOfCharacterFromSet:charSet options:0 range:range]; 273 | 274 | if ( range.location != NSNotFound ) 275 | { 276 | //convert found char to hex character code 277 | curChar = [self characterAtIndex:range.location]; 278 | hexString = [NSString stringWithFormat:formattedChar, curChar]; 279 | 280 | [self replaceCharactersInRange:range withString:hexString]; 281 | 282 | //adjust remaining length 283 | NSRange remainingRange; 284 | 285 | remainingRange.length = [self length] - (range.location + [hexString length]); 286 | remainingRange.location = range.location + [hexString length]; 287 | 288 | range = remainingRange; 289 | } 290 | } 291 | } 292 | 293 | @end 294 | -------------------------------------------------------------------------------- /Color Themes/Panic Palette.sss: -------------------------------------------------------------------------------- 1 | meta.coda { 2 | name: Panic Palette; 3 | author: Cabel Sasser; 4 | description: A darker theme with official Panic colors.; 5 | version: 1.0; 6 | icon-tint-color: #fc4349; 7 | } 8 | 9 | comment { 10 | color:#838c95; 11 | font-style:italic; 12 | } 13 | 14 | constant.numeric { 15 | color:#6f4ebc; 16 | font-weight:normal; 17 | } 18 | 19 | constant.numeric.keyword { 20 | color:#6f4ebc; 21 | } 22 | 23 | keyword { 24 | color:#63cce3; 25 | font-strike-through:none; 26 | font-underline:none; 27 | font-weight:normal; 28 | } 29 | 30 | keyword.control { 31 | color:#f82939; 32 | font-underline:none; 33 | } 34 | 35 | keyword.type { 36 | color:#f82939; 37 | font-underline:none; 38 | } 39 | 40 | language.function { 41 | color:#3beb2a; 42 | font-underline:none; 43 | } 44 | 45 | language.operator { 46 | color:#f82939; 47 | } 48 | 49 | language.variable { 50 | color:#f8f8f2; 51 | } 52 | 53 | markup.comment { 54 | color:#838c95; 55 | font-style:italic; 56 | } 57 | 58 | markup.constant.entity { 59 | color:#6f4ebc; 60 | } 61 | 62 | markup.declaration { 63 | color:#ffffff; 64 | } 65 | 66 | markup.inline.cdata { 67 | color:#6f4ebc; 68 | } 69 | 70 | markup.processing { 71 | color:#6f4ebc; 72 | font-style:italic; 73 | font-weight:normal; 74 | } 75 | 76 | markup.tag { 77 | color:#f82939; 78 | } 79 | 80 | markup.tag.attribute.name { 81 | color:#3beb2a; 82 | } 83 | 84 | markup.tag.attribute.value { 85 | color:#fcc146; 86 | } 87 | 88 | meta.default { 89 | background-color:#111c2a; 90 | color:#f6f7ee; 91 | } 92 | 93 | meta.folding { 94 | color:#2d4562; 95 | } 96 | 97 | meta.higlight.currentline { 98 | background-color:#454640; 99 | } 100 | 101 | meta.important { 102 | color:#e4183c; 103 | } 104 | 105 | meta.invalid { 106 | background-color:#f82939; 107 | color:#f8f8f1; 108 | font-weight:normal; 109 | } 110 | 111 | meta.invisible.characters { 112 | color:#454640; 113 | } 114 | 115 | meta.link { 116 | color:#63cce3; 117 | font-style:italic; 118 | font-underline:none; 119 | } 120 | 121 | string { 122 | color:#fcc146; 123 | } 124 | 125 | string.regex { 126 | color:#fcc146; 127 | } 128 | 129 | string.regex.escaped { 130 | color:#6f4ebc; 131 | } 132 | 133 | style.at-rule { 134 | color:#f82939; 135 | font-style:italic; 136 | font-weight:bold; 137 | } 138 | 139 | style.comment { 140 | color:#838c95; 141 | font-style:italic; 142 | font-weight:normal; 143 | } 144 | 145 | style.property.name { 146 | color:#3beb2a; 147 | font-style:italic; 148 | } 149 | 150 | style.value.color.rgb-value { 151 | color:#6f4ebc; 152 | } 153 | 154 | style.value.keyword { 155 | color:#63cce3; 156 | } 157 | 158 | style.value.numeric { 159 | color:#6f4ebc; 160 | } 161 | 162 | style.value.string { 163 | color:#fcc146; 164 | } 165 | 166 | support { 167 | color:#63cce3; 168 | font-underline:none; 169 | } 170 | 171 | -------------------------------------------------------------------------------- /Color Themes/README.md: -------------------------------------------------------------------------------- 1 | In Coda 2 syntax highlighting is done with a combination of a syntax mode and a color theme. 2 | 3 | Justin Hileman wrote [an article](http://justinhileman.info/article/coda-2-modes-scopes-and-you/) describing a bit how syntax highlighting interacts with modes. 4 | 5 | The format for the color themes is *very* similar to CSS in how to attach text attributes to scopes. Some things to consider about the theme are: 6 | 7 | * Scope matching is done using simple prefix matching. E.g.: if a style is defined in a theme, then `style.value.numeric` will use this style unless a more specific scope (e.g. `style.value`) is defined 8 | * If a Style does not specify all attributes, it inherits from the next less specific style. In the end all Styles inherit from meta.default 9 | * Themes should represent a complete color scheme, providing at least all high level scopes 10 | 11 | We're including a sample color theme to get you started. 12 | 13 | ### Scopes 14 | * `meta.coda` - Info about the theme 15 | * `meta.default` - Default fallback scope. All scopes fall back on the defaults of this scope. The meta.default scope of the top-level Language Context also defines the base background and foreground color of the document. 16 | * `meta.block.interpolation` 17 | * `meta.highlight.currentline` - Style information that can be used to highlight the current line 18 | * `meta.important` 19 | * `meta.invalid` 20 | * `meta.invalid.ampersand` 21 | * `meta.invalid.sgmlcomment` 22 | * `meta.invisible.character` - Style for inivisble characters if shown (currently only the foreground color is used) 23 | * `meta.link` 24 | * `meta.link.email` 25 | * `meta.folding` 26 | * `meta.invalid` 27 | 28 | --- 29 | 30 | * `comment` 31 | * `comment.block` 32 | * `comment.block.documentation` 33 | * `comment.block.documentation.tags` 34 | * `comment.line` 35 | 36 | --- 37 | 38 | * `constant` 39 | * `constant.numeric` 40 | * `constant.numeric.character` 41 | * `constant.numeric.keyword` 42 | 43 | --- 44 | 45 | * `keyword` 46 | * `keyword.class` 47 | * `keyword.control` 48 | * `keyword.directive` 49 | * `keyword.function` 50 | * `keyword.type` 51 | 52 | --- 53 | 54 | * `language` 55 | * `language.function` 56 | * `language.variable` 57 | * `language.variable.instance` 58 | * `language.variable.class` 59 | * `language.variable.global.builtin` 60 | * `language.variable.string` 61 | 62 | --- 63 | 64 | * `markup.comment` 65 | * `markup.constant.entity` 66 | * `markup.declaration` 67 | * `markup.declaration.string.double` 68 | * `markup.declaration.string.single` 69 | * `markup.inline.cdata` 70 | * `markup.processing` 71 | * `markup.processing.attribute.value.string` 72 | * `markup.processing.languageswitch` 73 | * `markup.tag` 74 | * `markup.tag.attribute.name` 75 | * `markup.tag.attribute.value` 76 | * `markup.tag.attribute.value.string` 77 | 78 | --- 79 | 80 | * `string` 81 | * `string.double` 82 | * `string.double.nsstring` 83 | * `string.exec` 84 | * `string.single` 85 | * `string.here-doc` 86 | * `string.here-doc.indented` 87 | * `string.regex` 88 | * `string.symbol` 89 | 90 | --- 91 | 92 | * `style.at-rule` 93 | * `style.comment` 94 | * `style.comment.block` 95 | * `style.comment.block.documentation` 96 | * `style.property.name` 97 | * `style.value` 98 | * `style.value.color.rgb-value` 99 | * `style.value.keyword` 100 | * `style.value.numeric` 101 | * `style.value.string` 102 | * `style.value.string.double` 103 | * `style.value.string.single` 104 | 105 | --- 106 | 107 | * `support` 108 | * `support.accessor` 109 | * `support.class.standard` 110 | * `support.function` 111 | * `support.method.special` 112 | -------------------------------------------------------------------------------- /Completions/Simple.codacompletion/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodaAuthorString 6 | Panic Inc. 7 | CodaDescriptionString 8 | Sample 0.1 autocompletion addition. 9 | CodaIconMaskTintString 10 | #06759b 11 | CFBundleIdentifier 12 | com.panic.coda.completions.sample 13 | CFBundleName 14 | Sample Additions 15 | NSHumanReadableCopyright 16 | © 2014 Panic Inc. 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1.0 21 | CFBundleGetInfoString 22 | 1.0, Copyright Panic Inc. 2016 23 | CFBundlePackageType 24 | BNDL 25 | CFBundleInfoDictionaryVersion 26 | 6.0 27 | ModeIdentifiers 28 | 29 | SEEMode.PHP-HTML 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Completions/Simple.codacompletion/Contents/Resources/Additions.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Completions 6 | 7 | 8 | ID 9 | PHP_VERSION 10 | String 11 | PHP_VERSION 12 | PostString 13 | 14 | SelectionRange 15 | {11, 0} 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Completions/WordPress 3.7.1 Additions.codacompletion/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodaAuthorString 6 | Panic Inc. 7 | CodaDescriptionString 8 | WordPress 3.7.1 autocompletion addition. 9 | CodaIconMaskTintString 10 | #06759b 11 | CFBundleIdentifier 12 | com.panic.coda.completions.wordpress.3.7.1-additions 13 | CFBundleName 14 | WordPress 3.7.1 Additions 15 | NSHumanReadableCopyright 16 | © 2013 Panic Inc. 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1.0 21 | CFBundleGetInfoString 22 | 1.0, Copyright Panic Inc. 2013 23 | CFBundlePackageType 24 | BNDL 25 | CFBundleInfoDictionaryVersion 26 | 6.0 27 | ModeIdentifiers 28 | 29 | SEEMode.PHP-HTML 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Completions/jQuery 1.10.2 Additions.codacompletion/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodaAuthorString 6 | Panic Inc. 7 | CodaDescriptionString 8 | jQuery 1.10.2 autocompletion addition. 9 | CodaIconMaskTintString 10 | #0669ad 11 | CFBundleIdentifier 12 | com.panic.coda.completions.jquery.1.10.2-additions 13 | CFBundleName 14 | jQuery 1.10.2 Additions 15 | NSHumanReadableCopyright 16 | © 2013 Panic Inc. 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1.0 21 | CFBundleGetInfoString 22 | 1.0, Copyright Panic Inc. 2013 23 | CFBundlePackageType 24 | BNDL 25 | CFBundleInfoDictionaryVersion 26 | 6.0 27 | ModeIdentifiers 28 | 29 | SEEMode.JavaScript 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Coda Plug-in Kit 2 | 3 | If you've ever wished Coda could do even more than it does already, you're at the right place. 4 | 5 | Coda 1.6 and later support Coda Plug-ins, which allow you to further extend its text editing functionality — even if you can't program Cocoa. 6 | 7 | Plug-ins have access to the text of the current document and can perform modifications on it as desired. For example, you could write a plug-in to insert the current date and time into your document, change the case of selected text, run code through a custom validator, or even wrap code with a special tag. 8 | 9 | Plug-ins appear in Coda's plug-in menu or sidebar when installed. 10 | 11 | ## Get the [Coda Plug-In Creator](http://download.panic.com/coda/Coda%20Plug-in%20Creator.zip) 12 | 13 | There are three ways to write a plug-in. The first way is to write a script in any common scripting language, then use the separate [Coda Plug-In Creator](http://download.panic.com/coda/Coda%20Plug-in%20Creator.zip) application to bundle your script into a Coda plug-in. 14 | 15 | The second (more complex) way is to write directly to the Cocoa Plug-In API. You may create sidebar, text, and validation plugins using Cocoa. Lastly, sidebar plugins can be written using the new HTML/Scripting interface in 2.5. 16 | 17 | Coda also allows further customization through the additional add-ons: Syntax Modes, Mode Completion Additions, and Themes. Syntax Modes allow Coda to understand and highlight languages that aren't included in the default application installation. Mode Completions extend the auto-complete system to include custom language additions for libraries and frameworks. Color Themes provide customized colors to be used for syntax highlighting source code. 18 | 19 | If you'd like to submit a plugin to us please create an account at our [plugin site](https://panic.com/users/) and follow the instructions. 20 | -------------------------------------------------------------------------------- /Script Plug-ins/Capitalization.codaplugin/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 11E53 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | CodaScriptPlugIn 11 | CFBundleIconFile 12 | plug-in 13 | CFBundleIdentifier 14 | com.panic.CodaScriptPlugIn 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.1 23 | CodaPlugInMinimumAPIVersion 24 | 5 25 | CodaPlugInSupportedAPIVersion 26 | 6 27 | DTCompiler 28 | 29 | DTPlatformBuild 30 | 4E2002 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 10K549 35 | DTSDKName 36 | macosx10.6 37 | DTXcode 38 | 0432 39 | DTXcodeBuild 40 | 4E2002 41 | NSPrincipalClass 42 | CodaScriptPlugIn 43 | commands 44 | 45 | 46 | fallbackInput 47 | word 48 | input 49 | selection 50 | keyEquivalent 51 | 52 | keyEquivalentConflict 53 | 54 | name 55 | Make Uppercase 56 | output 57 | replaceSelectedText 58 | script 59 | uppercase.php 60 | uuid 61 | 14B10CED-C7A2-4014-898F-6CE1CD81B857 62 | 63 | 64 | fallbackInput 65 | word 66 | input 67 | selection 68 | keyEquivalentConflict 69 | 70 | name 71 | Make Lowercase 72 | output 73 | replaceSelectedText 74 | script 75 | lowercase.php 76 | uuid 77 | 9AD79B6A-7D8B-4313-A1F6-73EA2E515531 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Script Plug-ins/Capitalization.codaplugin/Contents/MacOS/CodaScriptPlugIn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Capitalization.codaplugin/Contents/MacOS/CodaScriptPlugIn -------------------------------------------------------------------------------- /Script Plug-ins/Capitalization.codaplugin/Contents/Resources/14B10CED-C7A2-4014-898F-6CE1CD81B857/uppercase.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | -------------------------------------------------------------------------------- /Script Plug-ins/Capitalization.codaplugin/Contents/Resources/9AD79B6A-7D8B-4313-A1F6-73EA2E515531/lowercase.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | -------------------------------------------------------------------------------- /Script Plug-ins/Capitalization.codaplugin/Contents/Resources/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Capitalization.codaplugin/Contents/Resources/English.lproj/Localizable.strings -------------------------------------------------------------------------------- /Script Plug-ins/Capitalization.codaplugin/Contents/Resources/Japanese.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Capitalization.codaplugin/Contents/Resources/Japanese.lproj/Localizable.strings -------------------------------------------------------------------------------- /Script Plug-ins/Print Env.codaplugin/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 11E53 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | CodaScriptPlugIn 11 | CFBundleIconFile 12 | plug-in 13 | CFBundleIdentifier 14 | com.panic.CodaScriptPlugIn 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.1 23 | CodaPlugInMinimumAPIVersion 24 | 5 25 | CodaPlugInSupportedAPIVersion 26 | 6 27 | DTCompiler 28 | 29 | DTPlatformBuild 30 | 4E2002 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 10K549 35 | DTSDKName 36 | macosx10.6 37 | DTXcode 38 | 0432 39 | DTXcodeBuild 40 | 4E2002 41 | NSPrincipalClass 42 | CodaScriptPlugIn 43 | commands 44 | 45 | 46 | fallbackInput 47 | none 48 | keyEquivalent 49 | 50 | keyEquivalentConflict 51 | 52 | name 53 | Print Environment 54 | output 55 | showAsHTML 56 | script 57 | print_env.pl 58 | uuid 59 | 4ABE9341-B4C0-42A4-A758-7944E48C14B6 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Script Plug-ins/Print Env.codaplugin/Contents/MacOS/CodaScriptPlugIn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Print Env.codaplugin/Contents/MacOS/CodaScriptPlugIn -------------------------------------------------------------------------------- /Script Plug-ins/Print Env.codaplugin/Contents/Resources/4ABE9341-B4C0-42A4-A758-7944E48C14B6/print_env.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | print "$CODA_LINE_ENDING"; 4 | print "$CODA_LINE_ENDING"; 5 | 6 | print ""; 7 | print "$CODA_LINE_ENDING"; 8 | 9 | $i = 0; 10 | 11 | for my $key ( keys %ENV ) 12 | { 13 | my $value = $ENV{$key}; 14 | 15 | if ( ($i % 2) == 0 ) 16 | { 17 | print "$CODA_LINE_ENDING"; 18 | } 19 | else 20 | { 21 | print "$CODA_LINE_ENDING"; 22 | } 23 | 24 | print "$CODA_LINE_ENDING"; 25 | print "$CODA_LINE_ENDING"; 26 | 27 | print "$CODA_LINE_ENDING"; 28 | 29 | ++$i; 30 | } 31 | 32 | print "
$key$value
$CODA_LINE_ENDING"; 33 | print ""; 34 | 35 | print "$CODA_LINE_ENDING"; 36 | print "$CODA_LINE_ENDING"; 37 | 38 | -------------------------------------------------------------------------------- /Script Plug-ins/Print Env.codaplugin/Contents/Resources/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Print Env.codaplugin/Contents/Resources/English.lproj/Localizable.strings -------------------------------------------------------------------------------- /Script Plug-ins/Print Env.codaplugin/Contents/Resources/Japanese.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Print Env.codaplugin/Contents/Resources/Japanese.lproj/Localizable.strings -------------------------------------------------------------------------------- /Script Plug-ins/README.md: -------------------------------------------------------------------------------- 1 | These plug-ins are script-based Coda plug-ins. To edit them use [Coda Plug-in Creator](http://download.panic.com/coda/Coda%20Plug-in%20Creator.zip) 2.0 or higher. 2 | 3 | -------------------------------------------------------------------------------- /Script Plug-ins/Text.codaplugin/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 11E53 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | CodaScriptPlugIn 11 | CFBundleIconFile 12 | plug-in 13 | CFBundleIdentifier 14 | com.panic.CodaScriptPlugIn 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.1 23 | CodaPlugInMinimumAPIVersion 24 | 5 25 | CodaPlugInSupportedAPIVersion 26 | 6 27 | DTCompiler 28 | 29 | DTPlatformBuild 30 | 4E2002 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 10K549 35 | DTSDKName 36 | macosx10.6 37 | DTXcode 38 | 0432 39 | DTXcodeBuild 40 | 4E2002 41 | NSPrincipalClass 42 | CodaScriptPlugIn 43 | commands 44 | 45 | 46 | fallbackInput 47 | none 48 | input 49 | selection 50 | keyEquivalentConflict 51 | 52 | name 53 | Strip Tags 54 | output 55 | replaceSelectedText 56 | script 57 | striptags.php 58 | uuid 59 | 36303DDD-B548-4E20-8C11-6328568961FF 60 | 61 | 62 | fallbackInput 63 | none 64 | input 65 | selection 66 | keyEquivalentConflict 67 | 68 | name 69 | Join Lines 70 | output 71 | replaceSelectedText 72 | script 73 | joinlines.php 74 | uuid 75 | 1B2F309E-50B0-42CD-859A-87581AAEE6A6 76 | 77 | 78 | fallbackInput 79 | document 80 | input 81 | selection 82 | keyEquivalent 83 | 84 | keyEquivalentConflict 85 | 86 | name 87 | Calculate Length 88 | output 89 | showAsHTML 90 | script 91 | length.php 92 | uuid 93 | 7120D3E4-4D47-4379-85D7-7D7A60CE705F 94 | 95 | 96 | fallbackInput 97 | word 98 | input 99 | selection 100 | keyEquivalentConflict 101 | 102 | name 103 | Convert to Tag Pair 104 | output 105 | replaceSelectedText 106 | script 107 | converttotag.php 108 | setInsertionPoint 109 | 110 | uuid 111 | 4D913BBD-6102-4042-92BB-BB1E0D94AD7A 112 | 113 | 114 | fallbackInput 115 | none 116 | keyEquivalentConflict 117 | 118 | name 119 | Insert Date 120 | output 121 | replaceSelectedText 122 | script 123 | insertdate.php 124 | uuid 125 | 64CB269F-1EA6-43EB-AB0D-46BA1D780F46 126 | 127 | 128 | fallbackInput 129 | none 130 | keyEquivalentConflict 131 | 132 | name 133 | Insert Time 134 | output 135 | replaceSelectedText 136 | script 137 | inserttime.php 138 | uuid 139 | 891FE431-ACB7-4B7E-B59E-18A6017FF2E4 140 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /Script Plug-ins/Text.codaplugin/Contents/MacOS/CodaScriptPlugIn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Text.codaplugin/Contents/MacOS/CodaScriptPlugIn -------------------------------------------------------------------------------- /Script Plug-ins/Text.codaplugin/Contents/Resources/1B2F309E-50B0-42CD-859A-87581AAEE6A6/joinlines.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | -------------------------------------------------------------------------------- /Script Plug-ins/Text.codaplugin/Contents/Resources/36303DDD-B548-4E20-8C11-6328568961FF/striptags.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | -------------------------------------------------------------------------------- /Script Plug-ins/Text.codaplugin/Contents/Resources/4D913BBD-6102-4042-92BB-BB1E0D94AD7A/converttotag.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | "; 13 | echo '$$IP$$'; 14 | echo ""; 15 | 16 | ?> -------------------------------------------------------------------------------- /Script Plug-ins/Text.codaplugin/Contents/Resources/64CB269F-1EA6-43EB-AB0D-46BA1D780F46/insertdate.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | -------------------------------------------------------------------------------- /Script Plug-ins/Text.codaplugin/Contents/Resources/7120D3E4-4D47-4379-85D7-7D7A60CE705F/length.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | -------------------------------------------------------------------------------- /Script Plug-ins/Text.codaplugin/Contents/Resources/891FE431-ACB7-4B7E-B59E-18A6017FF2E4/inserttime.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | -------------------------------------------------------------------------------- /Script Plug-ins/Text.codaplugin/Contents/Resources/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Text.codaplugin/Contents/Resources/English.lproj/Localizable.strings -------------------------------------------------------------------------------- /Script Plug-ins/Text.codaplugin/Contents/Resources/Japanese.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Text.codaplugin/Contents/Resources/Japanese.lproj/Localizable.strings -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 11E53 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | CodaScriptPlugIn 11 | CFBundleIconFile 12 | plug-in 13 | CFBundleIdentifier 14 | com.panic.CodaScriptPlugIn 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.1 23 | CodaPlugInMinimumAPIVersion 24 | 5 25 | CodaPlugInSupportedAPIVersion 26 | 6 27 | DTCompiler 28 | 29 | DTPlatformBuild 30 | 4E2002 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 10K549 35 | DTSDKName 36 | macosx10.6 37 | DTXcode 38 | 0432 39 | DTXcodeBuild 40 | 4E2002 41 | NSPrincipalClass 42 | CodaScriptPlugIn 43 | commands 44 | 45 | 46 | fallbackInput 47 | word 48 | input 49 | selection 50 | keyEquivalentConflict 51 | 52 | name 53 | Bold 54 | output 55 | replaceSelectedText 56 | script 57 | bold.php 58 | uuid 59 | 7AC1DF3F-A911-49E7-8A46-C2B415F7D62C 60 | 61 | 62 | fallbackInput 63 | word 64 | input 65 | selection 66 | keyEquivalentConflict 67 | 68 | name 69 | Italic 70 | output 71 | replaceSelectedText 72 | script 73 | italic.php 74 | uuid 75 | 59479047-133C-471C-91FD-C71C58176B0C 76 | 77 | 78 | fallbackInput 79 | word 80 | input 81 | selection 82 | keyEquivalentConflict 83 | 84 | name 85 | Underline 86 | output 87 | replaceSelectedText 88 | script 89 | underline.php 90 | uuid 91 | 08FD46B0-8E43-4D72-AA9B-2EF9F285F8C0 92 | 93 | 94 | fallbackInput 95 | word 96 | input 97 | selection 98 | keyEquivalent 99 | 100 | keyEquivalentConflict 101 | 102 | name 103 | Strike 104 | output 105 | replaceSelectedText 106 | script 107 | strike.php 108 | uuid 109 | 51AE6B04-3670-43DA-AAD0-A8DFC431F604 110 | 111 | 112 | fallbackInput 113 | word 114 | input 115 | selection 116 | keyEquivalentConflict 117 | 118 | name 119 | Link 120 | output 121 | replaceSelectedText 122 | script 123 | link.php 124 | setInsertionPoint 125 | 126 | uuid 127 | 02429196-ED06-40C3-A82F-D85876536D89 128 | 129 | 130 | fallbackInput 131 | word 132 | input 133 | selection 134 | keyEquivalentConflict 135 | 136 | name 137 | Paragraph 138 | output 139 | replaceSelectedText 140 | script 141 | paragraph.php 142 | uuid 143 | F4381209-A9EC-4EDB-9CF7-D8BCEB332B51 144 | 145 | 146 | fallbackInput 147 | word 148 | input 149 | selection 150 | keyEquivalentConflict 151 | 152 | name 153 | Div 154 | output 155 | replaceSelectedText 156 | script 157 | div.php 158 | uuid 159 | 812D57E6-7534-4112-92AF-0D3807234B01 160 | 161 | 162 | fallbackInput 163 | word 164 | input 165 | selection 166 | keyEquivalentConflict 167 | 168 | name 169 | Span 170 | output 171 | replaceSelectedText 172 | script 173 | span.php 174 | uuid 175 | DC5A2C55-3AA2-4C17-8CF8-E0A862BE4373 176 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/MacOS/CodaScriptPlugIn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Wrap With Tag.codaplugin/Contents/MacOS/CodaScriptPlugIn -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/02429196-ED06-40C3-A82F-D85876536D89/link.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | '; 13 | echo $input; 14 | echo ''; 15 | 16 | ?> -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/08FD46B0-8E43-4D72-AA9B-2EF9F285F8C0/underline.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | '; 13 | echo $input; 14 | echo ''; 15 | 16 | ?> -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/51AE6B04-3670-43DA-AAD0-A8DFC431F604/strike.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | '; 13 | echo $input; 14 | echo ''; 15 | 16 | ?> -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/59479047-133C-471C-91FD-C71C58176B0C/italic.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | '; 13 | echo $input; 14 | echo ''; 15 | 16 | ?> -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/7AC1DF3F-A911-49E7-8A46-C2B415F7D62C/bold.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | '; 13 | echo $input; 14 | echo ''; 15 | 16 | ?> -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/812D57E6-7534-4112-92AF-0D3807234B01/div.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | '; 13 | echo $input; 14 | echo ''; 15 | 16 | ?> -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/DC5A2C55-3AA2-4C17-8CF8-E0A862BE4373/span.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | '; 13 | echo $input; 14 | echo ''; 15 | 16 | ?> -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/English.lproj/Localizable.strings -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/F4381209-A9EC-4EDB-9CF7-D8BCEB332B51/paragraph.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php 2 | '; 13 | echo $input; 14 | echo '

'; 15 | 16 | ?> -------------------------------------------------------------------------------- /Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/Japanese.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Script Plug-ins/Wrap With Tag.codaplugin/Contents/Resources/Japanese.lproj/Localizable.strings -------------------------------------------------------------------------------- /Syntax Modes/README.md: -------------------------------------------------------------------------------- 1 | Included here is a copy of our XML mode as a place to start developing your own modes. -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | SEEMode.XML 7 | CFBundleName 8 | XML 9 | CFBundleShortVersionString 10 | 3.5 11 | NSHumanReadableCopyright 12 | © 2009 TheCodingMonkeys 13 | http://www.codingmonkeys.de 14 | CFBundleVersion 15 | 3.5 16 | CFBundleGetInfoString 17 | 3.5, Copyright TheCodingMonkeys 2009 18 | CFBundlePackageType 19 | BNDL 20 | CFBundleInfoDictionaryVersion 21 | 6.0 22 | SEEMinimumEngineVersion 23 | 3.5 24 | 25 | 26 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/ChangeLog.txt: -------------------------------------------------------------------------------- 1 | Changes with Version 3.5 (SEE 3.5) 2 | *) fixed mode recognition string 3 | *) added code folding 4 | 5 | Changes with Version 1.4 (SEE 2.6.4) 6 | *) fixed the validate scripts to work with unicode and leopard 7 | *) fixed the validate scripts to work with tabs 8 | 9 | Changes with Version 1.3 (SEE 2.5.1) 10 | *) Substituted 501 with `id -g` to make all utf-8 "do shell script" commands work on non-501 users. (fixes SEE-1042) 11 | *) Corrected precedence of states for built-in modes 12 | *) Fixed issue SEE-1040: "Check Syntax" script has same key shortcut as block edit by changing it to ctrl-command-b 13 | *) Improved XSLT script to always use the same window and report errors 14 | 15 | 16 | Changes with Version 1.2 (SEE 2.5) 17 | 18 | *) added scripts: Close Last Tag, Check Well Fromedness, Validate, Transform With XSLT, Comment Selection, Insert/Edit HTML Color. 19 | *) EXTENSIONS: Added sdef, xsd 20 | *) Fixed SEE-913: Newlines in XML tags cause subsequent lines not to be syntax highlighted. 21 | *) Fixed SEE-1015 by simplifying attributes in new XML.mode 22 | 23 | Changes with Version 1.1 24 | 25 | *) EXTENSIONS: Added uppercase variants where appropriate. 26 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/CodaCompletion.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Comments 6 | 7 | EndTag 8 | --> 9 | StartTag 10 | <!-- 11 | 12 | Name 13 | XML 14 | 15 | 16 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/English.lproj/ExampleSyntax.txt: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | ]> 8 | 9 | 10 | 11 | 12 | 13 | 14 | http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date; 15 | 16 | 18 | 19 | [^<&'] 20 | Hello, world!]]> 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/English.lproj/Localizable.strings -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/English.lproj/ScopeExamples.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | meta.default 6 | Default Text 7 | meta.highlight.currentline 8 | - 9 | meta.invisible.character 10 | ¶ . 11 | meta.link 12 | http://apple.com www.panic.com 13 | meta.link.email 14 | steve@apple.com 15 | markup.constant.entity 16 | &lt; &#160; &#x2014; 17 | meta.invalid.sgmlcomment 18 | -- 19 | meta.invalid.ampersand 20 | & 21 | markup.comment 22 | <!-- SGML Comment --> 23 | markup.inline.cdata 24 | <![CDATA[<inline>Data</inline>]]> 25 | markup.processing 26 | <?xml version='1.0' encoding='utf-8'?> 27 | markup.tag 28 | <document> <br/> 29 | markup.tag.attribute.name 30 | href id class 31 | markup.tag.attribute.value.string 32 | "left" "utf-8" 33 | markup.declaration 34 | <!DOCTYPE > <!ENTITY > 35 | markup.declaration.string.double 36 | "spec.dtd" 37 | markup.declaration.string.single 38 | '<' 39 | markup.processing.attribute.value.string 40 | "utf-8" 'no' 41 | 42 | 43 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/French.lproj/ExampleSyntax.txt: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | ]> 8 | 9 | 10 | 11 | 12 | 13 | 14 | http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date; 15 | 16 | 18 | 19 | [^<&'] 20 | Hello, world!]]> 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/French.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/French.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/French.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/French.lproj/Localizable.strings -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/French.lproj/ScopeExamples.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | meta.default 6 | Default Text 7 | meta.highlight.currentline 8 | - 9 | meta.invisible.character 10 | ¶ . 11 | meta.link 12 | http://apple.com www.panic.com 13 | meta.link.email 14 | steve@apple.com 15 | markup.constant.entity 16 | &lt; &#160; &#x2014; 17 | meta.invalid.sgmlcomment 18 | -- 19 | meta.invalid.ampersand 20 | & 21 | markup.comment 22 | <!-- SGML Comment --> 23 | markup.inline.cdata 24 | <![CDATA[<inline>Data</inline>]]> 25 | markup.processing 26 | <?xml version='1.0' encoding='utf-8'?> 27 | markup.tag 28 | <document> <br/> 29 | markup.tag.attribute.name 30 | href id class 31 | markup.tag.attribute.value.string 32 | "left" "utf-8" 33 | markup.declaration 34 | <!DOCTYPE > <!ENTITY > 35 | markup.declaration.string.double 36 | "spec.dtd" 37 | markup.declaration.string.single 38 | '<' 39 | markup.processing.attribute.value.string 40 | "utf-8" 'no' 41 | 42 | 43 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/German.lproj/ExampleSyntax.txt: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | ]> 8 | 9 | 10 | 11 | 12 | 13 | 14 | http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date; 15 | 16 | 18 | 19 | [^<&'] 20 | Hello, world!]]> 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/German.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/German.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/German.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/German.lproj/Localizable.strings -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/German.lproj/ScopeExamples.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | meta.default 6 | Default Text 7 | meta.highlight.currentline 8 | - 9 | meta.invisible.character 10 | ¶ . 11 | meta.link 12 | http://apple.com www.panic.com 13 | meta.link.email 14 | steve@apple.com 15 | markup.constant.entity 16 | &lt; &#160; &#x2014; 17 | meta.invalid.sgmlcomment 18 | -- 19 | meta.invalid.ampersand 20 | & 21 | markup.comment 22 | <!-- SGML Comment --> 23 | markup.inline.cdata 24 | <![CDATA[<inline>Data</inline>]]> 25 | markup.processing 26 | <?xml version='1.0' encoding='utf-8'?> 27 | markup.tag 28 | <document> <br/> 29 | markup.tag.attribute.name 30 | href id class 31 | markup.tag.attribute.value.string 32 | "left" "utf-8" 33 | markup.declaration 34 | <!DOCTYPE > <!ENTITY > 35 | markup.declaration.string.double 36 | "spec.dtd" 37 | markup.declaration.string.single 38 | '<' 39 | markup.processing.attribute.value.string 40 | "utf-8" 'no' 41 | 42 | 43 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/ModeSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | xml 5 | xslt 6 | xsl 7 | xsd 8 | wsdl 9 | svg 10 | plist 11 | rss 12 | rdf 13 | seestyle 14 | scriptSuite 15 | scriptTerminology 16 | \A<\?xml 17 | 18 | 0.493, 0.874, 0.741 19 | 20 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/RegexSymbols.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <!-- 7 | --> 8 | 9 | 10 | 11 | 12 | <\w+\s+[^>]*id *= *"([^"]*)"[^>]*> 13 | 14 | 15 | 16 | 17 | <!--\s*![ \t]*(.*?)\s*--> 18 | 19 | 20 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/Scripts/10-CloseLastTag.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/Scripts/10-CloseLastTag.scpt -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/Scripts/20-CheckWellFormedness.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/Scripts/20-CheckWellFormedness.scpt -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/Scripts/30-Validate.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/Scripts/30-Validate.scpt -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/Scripts/50-TransformWithXSLT.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/Scripts/50-TransformWithXSLT.scpt -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/Scripts/Comment Selection.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/Scripts/Comment Selection.scpt -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/Scripts/Insert HTML Color.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/Scripts/Insert HTML Color.scpt -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/Scripts/shell/closetag.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | 4 | my $data = join "",; 5 | $data =~ s/[\n\r]/ /g; # throw out line breaks 6 | $data =~ s/\A[^<]*//g; # filter all characters up to first tag 7 | $data =~ s///g; # strip comments 8 | $data =~ s/(?<=>)[^<]*//g; # remove everthing that's not a tag 9 | $data =~ s/ .*?(\/?) *>/\1>/g; # remove attributes 10 | $data =~ s/\A[^>]*\Z//g; # remove eyerthing after the last > 12 | $data =~ s/ //g; 13 | 14 | my @tags = split />"; exit(0); 33 | } 34 | } 35 | } 36 | 37 | exit(-1); -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/StyleIDTransition.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | /XML/Attributes in Tags 6 | Tags.Attributes in Tags 7 | /XML/CDATA 8 | CDATA 9 | /XML/Comment 10 | Comment 11 | /XML/Doctype 12 | Doctype 13 | /XML/Entities 14 | Tags.Entities 15 | /XML/Escape 16 | Escape 17 | /XML/Strings in Tags 18 | Tags.Strings in Tags 19 | /XML/Tags 20 | Tags 21 | _Default 22 | _Default 23 | 24 | 25 | -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/Symbol!.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/Symbol!.png -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/Symbol!.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/Symbol!.tif -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/SymbolID.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/SymbolID.png -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/SymbolID.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Syntax Modes/XML.mode/Contents/Resources/SymbolID.tif -------------------------------------------------------------------------------- /Syntax Modes/XML.mode/Contents/Resources/SyntaxDefinition.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | XML 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | (&(?:\w{1,8};|#[0-9]+;|#x[A-Fa-f0-9]+;)) 19 | 20 | 21 | 22 | <!-- 23 | --> 24 | 25 | 26 | 27 | 28 | 29 | <!\s*\[CDATA\s*\[ 30 | \]\s*\]\s*> 31 | 32 | 33 | 34 | <! 35 | > 36 | 37 | " 38 | " 39 | 40 | 41 | ' 42 | ' 43 | 44 | 45 | \[\] 46 | ] 47 | 48 | 49 | 50 | 51 | 52 | <\? 53 | \?> 54 | 55 | " 56 | " 57 | 58 | 59 | ' 60 | ' 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | < 73 | 74 | 75 | > 76 | 77 | 78 | 79 | " 80 | " 81 | 82 | 83 | 84 | ' 85 | ' 86 | 87 | 88 | 89 | ([\w-]*)(?=[ \t]*=) 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /Webscript Sidebar plugins/Hello World.codawebscriptsidebar/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodaIconMaskFile 6 | html5-logo 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleIdentifier 10 | com.panic.plugin.HelloWorld 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Hello World 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleSignature 18 | ???? 19 | CFBundleShortVersionString 20 | 1.0 21 | CodaPlugInSupportedAPIVersion 22 | 6 23 | CodaDescriptionString 24 | A simple example showing how to create a Coda webscript sidebar plugin. 25 | CodaIconMaskTintString 26 | #91B05A 27 | CodaAuthorString 28 | Wade Cosgrove 29 | 30 | 31 | -------------------------------------------------------------------------------- /Webscript Sidebar plugins/Hello World.codawebscriptsidebar/html5-logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Webscript Sidebar plugins/Hello World.codawebscriptsidebar/html5-logo.pdf -------------------------------------------------------------------------------- /Webscript Sidebar plugins/Hello World.codawebscriptsidebar/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sidebar Controls 4 | 8 | 9 | 32 | 33 | 44 | 45 | 46 | 47 | 48 |
49 | 50 | 51 | 52 | 53 |
54 | 55 | 56 | 57 | 58 | 59 |
60 | 61 | 62 | 63 | 64 |
65 | 66 |

67 | This page demonstrates common controls used in the Coda sidebar. 68 |

69 | 70 |

71 | 72 | 73 |
74 | 75 | 76 |
77 | 78 | 79 |

80 | 81 |

82 | 83 | 84 |

85 | 86 |

87 | 88 | 89 |

90 | 91 |
92 | 93 |
94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /Webscript Sidebar plugins/Hello World.codawebscriptsidebar/web-trifecta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panicinc/CodaPluginKit/a861c056d66f63c202bc92e0e2354da1e5b8e200/Webscript Sidebar plugins/Hello World.codawebscriptsidebar/web-trifecta.png -------------------------------------------------------------------------------- /Webscript Sidebar plugins/README.md: -------------------------------------------------------------------------------- 1 | #### What are Webscript plugins: 2 | Webscript plugins allow developers to create plugins using HTML and Javascript that load within Coda and are able to present a user interface with access to the current file editor. These plugins live alongside the built-in sidebar tools and give the user quick access to their funtionality. Webscript plugins are file bundles, which are just folders with a custom Info.plist file contained within. The Info.plist file contains important information about the plugin, such as: name, description, author, version and more. 3 | 4 | #### Installation and debugging: 5 | Once you have created a Webscript plugin it should be installed in: /Users/home/Library/Application Support/Coda 2/Plug-ins/ 6 | Restart Coda to load the plug-in. Once the plugin is loaded, you may reload your plugin and its source by right-clicking anywhere in its interface and choosing the "Reload" option. The Web Inspector is also available for debugging sidebar plugins, just like a web page. Tip: to quickly install a plugin just double-click it in the Finder and Coda will do the rest. 7 | 8 | #### Optional Javascript callbacks: 9 | Implementing a function with one or more of the following signatures will cause Coda to call into the plugin when the desired event occurs. 10 | 11 | - textViewWillSave(CodaTextView) -- A document is going to be saved, the document is represented by a CodaTextView 12 | - textViewDidFocus(CodaTextView) -- A document became focused for editing 13 | - (string) willPublishFileAtPath(string) -- Original file path input, modified file path is returned. The file at the input path is about to be published. This is an appropriate place for doing pre-processing (EG: minifying) before uploading the file to a production server. 14 | - didLoadSiteNamed(string) -- The name of the Site being opened is passed to the plugin. 15 | 16 | #### CodaTextView functions: 17 | The text view represents a text document being editing in Coda and is the main interface for text manipulation. 18 | 19 | - (string) string -- the entire document contents 20 | - (string) path -- the path of the document if saved 21 | - save -- saves the current document 22 | - (bool) saveToPath(string) -- saves the document to the specified path

23 | - insertText(string) -- inserts text into the document 24 | - deleteSelection -- deletes the current selection 25 | - replaceCharactersInRangeWithString(range, string) -- Replaces characters in the specified range with the replacement string

26 | - (string) selectedText -- returns the current document selection as string 27 | - (range) selectedRange -- The range of the current selection 28 | - setSelectedRange(range) -- Modifies the selection to be range 29 | - (string) stringWithRange(range) -- The string contained within range 30 | - (range) previousWordRange -- The word before the insertion point 31 | - (range) currentWordRange -- The word being edited 32 | - (string) currentLine -- the string on the line being edited 33 | - (int) currentLineNumber -- the line number of the insertion point 34 | - (range) rangeOfCurrentLine -- The range of the line being edited 35 | - (int) getColumn -- the column of the insertion point on the current line 36 | - (int) getLine -- the line of the insertion point 37 | - (int) startOfLine -- the index of the character that starts the current line 38 | - goToLineAndColumn(int, int) -- move the insertion point to the specified line and column

39 | - (int) encoding -- The string encoding for the document, use NSStringEncoding defined values 40 | - (string) modeIdentifier -- The current editing syntax mode's identifier, useful for determining the current language in use 41 | - (string) lineEnding -- the line ending string of the document 42 | - (bool) usesTabs -- flag indicating if the document uses spaces or tabs 43 | - (int) tabWidth -- the number of spaces in which to insert when using tabs

44 | - beginUndoGrouping -- starts an undo group to allow for grouped edits 45 | - endUndoGrouping -- ends an undo group to allow for grouped edits

46 | - (string) siteURL -- the local URL for the open Site 47 | - (string) siteLocalURL -- the open Site local URL, useful for local environment testing 48 | - (string) siteRemotePath -- the root path of the Site on the server 49 | - (string) siteLocalPath -- the root path for the Site on the local machine 50 | - (string) siteNickname -- name used for the Site 51 | - (string) remoteURL -- the remote URL for the open Site 52 | - (string) siteUUID -- The unique identifier for the open site 53 | 54 | #### Range type example: 55 | 56 | ```Javascript 57 | var range= {length:10, location:1}; 58 | CodaTextView.setSelectedRange(range); 59 | ``` 60 | 61 | #### CodaPlugInsController: 62 | The plugins controller allows plugins to communicate with Coda. The following commands are available: 63 | 64 | - (string) codaVersion - The version of Coda hosting the plugin. 65 | - (int) apiVersion - The plugin API version Coda is currently using. 66 | - (CodaTextView) makeUntitledDocument - Creates a new document. 67 | - (CodaTextView) openFileAtPath(string) -- Opens the document at path in a new tab. 68 | - saveAll - Saves all open documents. 69 | - displayHTMLString(string) - Renders the given HTML in a new preview tab. 70 | - displayHTMLStringWithBaseURL(string, string) -- Renders the given HTML in a new preview tab using the base URL for any embedded links or resources. 71 | - (int) runCommand(string, array) - Runs the command line tool at the specified path. Accepts an array of string arguments to pass to the tool. Returns the result value from the tool after completion. 72 | 73 | 74 | #### CodaPlugInPreferences: 75 | The plugin preferences interface allows plugins store and retrieve values. 76 | 77 | - (string)preferenceForKey(string) -- Returns the previously saved value for the specified key. 78 | - setPreferenceForKey(string, string) -- Saves the specified string for a key. The value is saved by Coda and persists accross application restarts. 79 | 80 | 81 | #### Info.plist keys: 82 | The Info.plist file defines metadata about the plugin and its functionality. 83 | 84 | - CodaAuthorString -- the author or company name 85 | - CodaDescriptionString -- a short description of the plugin for use on the webpage and within Coda 86 | - CodaIconMaskFile -- a black and white mask image which is used for the sidebar icon 87 | - CodaIconMaskTintString -- an optional hex color used to tint the icon mask in the preferences window 88 | - CodaPlugInSupportedAPIVersion -- the Coda API version the plugin conforms to 89 | - CFBundleIdentifier -- the unique identifier for your plugin, usually in the form of com.companyname.plugin 90 | - CFBundleName -- the plugin name 91 | - CFBundleShortVersionString -- the plugin version 92 | 93 | #### Styling buttons and Controls to match Coda 94 | Provided with the WebScript plugin API is a stylesheet that plugins may use to style their HTML controls to match the style Coda uses throughout its sidebar. For an example of how to use the included stylesheet, check out the `Hello World` plugin above. 95 | --------------------------------------------------------------------------------