├── .gitignore ├── LICENSE ├── README.md ├── screenshot ├── custom-shortcut.png ├── deleteline.gif ├── xcode-key-bindings-2.png └── xcode-key-bindings.png └── src └── XcodePlugDeleteLine ├── XcodePlus Delete Line.xcodeproj └── project.pbxproj ├── XcodePlusDeleteLine ├── Code │ └── DeleteLine │ │ ├── DeleteLine.h │ │ └── DeleteLine.m ├── XcodePlus Delete Line-Info.plist ├── XcodePlus Delete Line-Prefix.pch └── en.lproj │ └── InfoPlist.strings └── uncrustify.cfg /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | tmp/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 payliu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | XcodePlus 2 | ========= 3 | 4 | Xcode plugin to add extra feature. 5 | 6 | - delete line, even multi-lines 7 | 8 | # Usage 9 | ### Delete Line 10 | 11 | The default shortcut is `⌘D`, like in Eclipse. 12 | 13 | This shortcut should conflict to `Duplicate`, just remove it from `Key Bindings`. 14 | Or you would like to set different shortcut, please refer to [Custom Shortcut](#custom-shortcut). 15 | 16 | - Xcode > menu > Edit > `Delete Line` 17 | 18 | ![deleteline-git] 19 | 20 | #Installation 21 | 22 | 1. Install via [Alcatraz][alcatraz]. 23 | 2. Restart Xcode 24 | 25 | or 26 | 27 | 1. Clone it or Download ZIP and then build it. 28 | 2. You can find the `.xcplugin' from `'~/Library/Application Support/Developer/Shared/Xcode/Plug-ins` 29 | 3. Restart Xcode 30 | 31 | # Uninstall 32 | 33 | Delete the following directory 34 | 35 | ``` 36 | $HOME/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/XcodePlus\ Delete\ Line.xcplugin 37 | ``` 38 | 39 | # Custom Shortcut 40 | 41 | #### Resolve conflict of Key Bindings 42 | 43 | - If conflict, check your shortcut and remove from `Key Bindings` in Xcode. 44 | - conflict `Duplicate`, `⌘D` 45 | ![xcode-key-bindings] 46 | - conflict `Delete Forward`, `^D` 47 | ![xcode-key-bindings-2] 48 | 49 | #### Use my shortcut 50 | If you want to change the shortcut of `delete-line` you like. 51 | 52 | - open `System Preferences` > `Keyboard` > `Keyboard Shortcuts` 53 | - At Step#5, press the shoutcut you want. 54 | ![shortcut] 55 | 56 | #License 57 | MIT License 58 | 59 | 60 | 61 | [alcatraz]: http://mneorr.github.io/Alcatraz/ "Alcatraz" 62 | [deleteline-git]: https://raw.github.com/payliu/XcodePlus/master/screenshot/deleteline.gif 63 | [shortcut]: https://raw.github.com/payliu/XcodePlus/master/screenshot/custom-shortcut.png 64 | [xcode-key-bindings]: https://raw.github.com/payliu/XcodePlus/master/screenshot/xcode-key-bindings.png 65 | [xcode-key-bindings-2]: https://raw.github.com/payliu/XcodePlus/master/screenshot/xcode-key-bindings-2.png 66 | -------------------------------------------------------------------------------- /screenshot/custom-shortcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/payliu/XcodePlus/c24ae6832e3f2a3b6e10c5e090613e22eb1ce908/screenshot/custom-shortcut.png -------------------------------------------------------------------------------- /screenshot/deleteline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/payliu/XcodePlus/c24ae6832e3f2a3b6e10c5e090613e22eb1ce908/screenshot/deleteline.gif -------------------------------------------------------------------------------- /screenshot/xcode-key-bindings-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/payliu/XcodePlus/c24ae6832e3f2a3b6e10c5e090613e22eb1ce908/screenshot/xcode-key-bindings-2.png -------------------------------------------------------------------------------- /screenshot/xcode-key-bindings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/payliu/XcodePlus/c24ae6832e3f2a3b6e10c5e090613e22eb1ce908/screenshot/xcode-key-bindings.png -------------------------------------------------------------------------------- /src/XcodePlugDeleteLine/XcodePlus Delete Line.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6F1B21AC17DD5C0B00784419 /* DeleteLine.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F1B21AB17DD5C0B00784419 /* DeleteLine.m */; }; 11 | 6F44E9F617DD324B0064F1B7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F44E9F517DD324B0064F1B7 /* Cocoa.framework */; }; 12 | 6FC4CC5F17DD4B7A006D9784 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6FC4CC5D17DD4B7A006D9784 /* InfoPlist.strings */; }; 13 | /* End PBXBuildFile section */ 14 | 15 | /* Begin PBXFileReference section */ 16 | 6F1B21AA17DD5C0B00784419 /* DeleteLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeleteLine.h; sourceTree = ""; }; 17 | 6F1B21AB17DD5C0B00784419 /* DeleteLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeleteLine.m; sourceTree = ""; }; 18 | 6F44E9F217DD324B0064F1B7 /* XcodePlus Delete Line.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "XcodePlus Delete Line.xcplugin"; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | 6F44E9F517DD324B0064F1B7 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 20 | 6F44E9F817DD324B0064F1B7 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 21 | 6F44E9F917DD324B0064F1B7 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 22 | 6F44E9FA17DD324B0064F1B7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 23 | 6FC4CC5A17DD4B70006D9784 /* XcodePlus Delete Line-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "XcodePlus Delete Line-Info.plist"; path = "XcodePlusDeleteLine/XcodePlus Delete Line-Info.plist"; sourceTree = SOURCE_ROOT; }; 24 | 6FC4CC5B17DD4B70006D9784 /* XcodePlus Delete Line-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "XcodePlus Delete Line-Prefix.pch"; path = "XcodePlusDeleteLine/XcodePlus Delete Line-Prefix.pch"; sourceTree = SOURCE_ROOT; }; 25 | 6FC4CC5E17DD4B7A006D9784 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = XcodePlusDeleteLine/en.lproj/InfoPlist.strings; sourceTree = SOURCE_ROOT; }; 26 | /* End PBXFileReference section */ 27 | 28 | /* Begin PBXFrameworksBuildPhase section */ 29 | 6F44E9EF17DD324B0064F1B7 /* Frameworks */ = { 30 | isa = PBXFrameworksBuildPhase; 31 | buildActionMask = 2147483647; 32 | files = ( 33 | 6F44E9F617DD324B0064F1B7 /* Cocoa.framework in Frameworks */, 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXFrameworksBuildPhase section */ 38 | 39 | /* Begin PBXGroup section */ 40 | 6F44E9E917DD324B0064F1B7 = { 41 | isa = PBXGroup; 42 | children = ( 43 | 6FC4CC6117DD4BDD006D9784 /* Code */, 44 | 6F44E9FC17DD324B0064F1B7 /* Supporting Files */, 45 | 6F44E9F417DD324B0064F1B7 /* Frameworks */, 46 | 6F44E9F317DD324B0064F1B7 /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | 6F44E9F317DD324B0064F1B7 /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 6F44E9F217DD324B0064F1B7 /* XcodePlus Delete Line.xcplugin */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | 6F44E9F417DD324B0064F1B7 /* Frameworks */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 6F44E9F517DD324B0064F1B7 /* Cocoa.framework */, 62 | 6F44E9F717DD324B0064F1B7 /* Other Frameworks */, 63 | ); 64 | name = Frameworks; 65 | sourceTree = ""; 66 | }; 67 | 6F44E9F717DD324B0064F1B7 /* Other Frameworks */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | 6F44E9F817DD324B0064F1B7 /* AppKit.framework */, 71 | 6F44E9F917DD324B0064F1B7 /* CoreData.framework */, 72 | 6F44E9FA17DD324B0064F1B7 /* Foundation.framework */, 73 | ); 74 | name = "Other Frameworks"; 75 | sourceTree = ""; 76 | }; 77 | 6F44E9FC17DD324B0064F1B7 /* Supporting Files */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 6FC4CC5D17DD4B7A006D9784 /* InfoPlist.strings */, 81 | 6FC4CC5A17DD4B70006D9784 /* XcodePlus Delete Line-Info.plist */, 82 | 6FC4CC5B17DD4B70006D9784 /* XcodePlus Delete Line-Prefix.pch */, 83 | ); 84 | name = "Supporting Files"; 85 | path = XcodePlusDeleteLines; 86 | sourceTree = ""; 87 | }; 88 | 6FC4CC6117DD4BDD006D9784 /* Code */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 6FC4CC6217DD4BDD006D9784 /* DeleteLine */, 92 | ); 93 | name = Code; 94 | path = XcodePlusDeleteLine/Code; 95 | sourceTree = ""; 96 | }; 97 | 6FC4CC6217DD4BDD006D9784 /* DeleteLine */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 6F1B21AA17DD5C0B00784419 /* DeleteLine.h */, 101 | 6F1B21AB17DD5C0B00784419 /* DeleteLine.m */, 102 | ); 103 | path = DeleteLine; 104 | sourceTree = ""; 105 | }; 106 | /* End PBXGroup section */ 107 | 108 | /* Begin PBXNativeTarget section */ 109 | 6F44E9F117DD324B0064F1B7 /* XcodePlus Delete Line */ = { 110 | isa = PBXNativeTarget; 111 | buildConfigurationList = 6F44EA0417DD324B0064F1B7 /* Build configuration list for PBXNativeTarget "XcodePlus Delete Line" */; 112 | buildPhases = ( 113 | 6F44E9EE17DD324B0064F1B7 /* Sources */, 114 | 6F44E9EF17DD324B0064F1B7 /* Frameworks */, 115 | 6F44E9F017DD324B0064F1B7 /* Resources */, 116 | ); 117 | buildRules = ( 118 | ); 119 | dependencies = ( 120 | ); 121 | name = "XcodePlus Delete Line"; 122 | productName = XcodePlusDeleteLines; 123 | productReference = 6F44E9F217DD324B0064F1B7 /* XcodePlus Delete Line.xcplugin */; 124 | productType = "com.apple.product-type.bundle"; 125 | }; 126 | /* End PBXNativeTarget section */ 127 | 128 | /* Begin PBXProject section */ 129 | 6F44E9EA17DD324B0064F1B7 /* Project object */ = { 130 | isa = PBXProject; 131 | attributes = { 132 | LastUpgradeCheck = 0500; 133 | ORGANIZATIONNAME = "Octalord Information Inc."; 134 | }; 135 | buildConfigurationList = 6F44E9ED17DD324B0064F1B7 /* Build configuration list for PBXProject "XcodePlus Delete Line" */; 136 | compatibilityVersion = "Xcode 3.2"; 137 | developmentRegion = English; 138 | hasScannedForEncodings = 0; 139 | knownRegions = ( 140 | en, 141 | ); 142 | mainGroup = 6F44E9E917DD324B0064F1B7; 143 | productRefGroup = 6F44E9F317DD324B0064F1B7 /* Products */; 144 | projectDirPath = ""; 145 | projectRoot = ""; 146 | targets = ( 147 | 6F44E9F117DD324B0064F1B7 /* XcodePlus Delete Line */, 148 | ); 149 | }; 150 | /* End PBXProject section */ 151 | 152 | /* Begin PBXResourcesBuildPhase section */ 153 | 6F44E9F017DD324B0064F1B7 /* Resources */ = { 154 | isa = PBXResourcesBuildPhase; 155 | buildActionMask = 2147483647; 156 | files = ( 157 | 6FC4CC5F17DD4B7A006D9784 /* InfoPlist.strings in Resources */, 158 | ); 159 | runOnlyForDeploymentPostprocessing = 0; 160 | }; 161 | /* End PBXResourcesBuildPhase section */ 162 | 163 | /* Begin PBXSourcesBuildPhase section */ 164 | 6F44E9EE17DD324B0064F1B7 /* Sources */ = { 165 | isa = PBXSourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | 6F1B21AC17DD5C0B00784419 /* DeleteLine.m in Sources */, 169 | ); 170 | runOnlyForDeploymentPostprocessing = 0; 171 | }; 172 | /* End PBXSourcesBuildPhase section */ 173 | 174 | /* Begin PBXVariantGroup section */ 175 | 6FC4CC5D17DD4B7A006D9784 /* InfoPlist.strings */ = { 176 | isa = PBXVariantGroup; 177 | children = ( 178 | 6FC4CC5E17DD4B7A006D9784 /* en */, 179 | ); 180 | name = InfoPlist.strings; 181 | sourceTree = ""; 182 | }; 183 | /* End PBXVariantGroup section */ 184 | 185 | /* Begin XCBuildConfiguration section */ 186 | 6F44EA0217DD324B0064F1B7 /* Debug */ = { 187 | isa = XCBuildConfiguration; 188 | buildSettings = { 189 | ALWAYS_SEARCH_USER_PATHS = NO; 190 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 191 | CLANG_CXX_LIBRARY = "libc++"; 192 | CLANG_WARN_CONSTANT_CONVERSION = YES; 193 | CLANG_WARN_EMPTY_BODY = YES; 194 | CLANG_WARN_ENUM_CONVERSION = YES; 195 | CLANG_WARN_INT_CONVERSION = YES; 196 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 197 | COPY_PHASE_STRIP = NO; 198 | GCC_C_LANGUAGE_STANDARD = gnu99; 199 | GCC_DYNAMIC_NO_PIC = NO; 200 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 201 | GCC_OPTIMIZATION_LEVEL = 0; 202 | GCC_PREPROCESSOR_DEFINITIONS = ( 203 | "DEBUG=1", 204 | "$(inherited)", 205 | ); 206 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 207 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 208 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 209 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 210 | GCC_WARN_UNUSED_VARIABLE = YES; 211 | MACOSX_DEPLOYMENT_TARGET = 10.7; 212 | ONLY_ACTIVE_ARCH = YES; 213 | SDKROOT = macosx; 214 | }; 215 | name = Debug; 216 | }; 217 | 6F44EA0317DD324B0064F1B7 /* Release */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | ALWAYS_SEARCH_USER_PATHS = NO; 221 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 222 | CLANG_CXX_LIBRARY = "libc++"; 223 | CLANG_WARN_CONSTANT_CONVERSION = YES; 224 | CLANG_WARN_EMPTY_BODY = YES; 225 | CLANG_WARN_ENUM_CONVERSION = YES; 226 | CLANG_WARN_INT_CONVERSION = YES; 227 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 228 | COPY_PHASE_STRIP = YES; 229 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 230 | GCC_C_LANGUAGE_STANDARD = gnu99; 231 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 232 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 233 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 234 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 235 | GCC_WARN_UNUSED_VARIABLE = YES; 236 | MACOSX_DEPLOYMENT_TARGET = 10.7; 237 | SDKROOT = macosx; 238 | }; 239 | name = Release; 240 | }; 241 | 6F44EA0517DD324B0064F1B7 /* Debug */ = { 242 | isa = XCBuildConfiguration; 243 | buildSettings = { 244 | CLANG_ENABLE_OBJC_ARC = YES; 245 | COMBINE_HIDPI_IMAGES = YES; 246 | DEPLOYMENT_LOCATION = YES; 247 | DSTROOT = "${HOME}"; 248 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 249 | GCC_PREFIX_HEADER = "XcodePlusDeleteLine/XcodePlus Delete Line-Prefix.pch"; 250 | INFOPLIST_FILE = "XcodePlusDeleteLine/XcodePlus Delete Line-Info.plist"; 251 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 252 | PRODUCT_NAME = "XcodePlus Delete Line"; 253 | WRAPPER_EXTENSION = xcplugin; 254 | }; 255 | name = Debug; 256 | }; 257 | 6F44EA0617DD324B0064F1B7 /* Release */ = { 258 | isa = XCBuildConfiguration; 259 | buildSettings = { 260 | CLANG_ENABLE_OBJC_ARC = YES; 261 | COMBINE_HIDPI_IMAGES = YES; 262 | DEPLOYMENT_LOCATION = YES; 263 | DSTROOT = "${HOME}"; 264 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 265 | GCC_PREFIX_HEADER = "XcodePlusDeleteLine/XcodePlus Delete Line-Prefix.pch"; 266 | INFOPLIST_FILE = "XcodePlusDeleteLine/XcodePlus Delete Line-Info.plist"; 267 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 268 | PRODUCT_NAME = "XcodePlus Delete Line"; 269 | WRAPPER_EXTENSION = xcplugin; 270 | }; 271 | name = Release; 272 | }; 273 | /* End XCBuildConfiguration section */ 274 | 275 | /* Begin XCConfigurationList section */ 276 | 6F44E9ED17DD324B0064F1B7 /* Build configuration list for PBXProject "XcodePlus Delete Line" */ = { 277 | isa = XCConfigurationList; 278 | buildConfigurations = ( 279 | 6F44EA0217DD324B0064F1B7 /* Debug */, 280 | 6F44EA0317DD324B0064F1B7 /* Release */, 281 | ); 282 | defaultConfigurationIsVisible = 0; 283 | defaultConfigurationName = Release; 284 | }; 285 | 6F44EA0417DD324B0064F1B7 /* Build configuration list for PBXNativeTarget "XcodePlus Delete Line" */ = { 286 | isa = XCConfigurationList; 287 | buildConfigurations = ( 288 | 6F44EA0517DD324B0064F1B7 /* Debug */, 289 | 6F44EA0617DD324B0064F1B7 /* Release */, 290 | ); 291 | defaultConfigurationIsVisible = 0; 292 | defaultConfigurationName = Release; 293 | }; 294 | /* End XCConfigurationList section */ 295 | }; 296 | rootObject = 6F44E9EA17DD324B0064F1B7 /* Project object */; 297 | } 298 | -------------------------------------------------------------------------------- /src/XcodePlugDeleteLine/XcodePlusDeleteLine/Code/DeleteLine/DeleteLine.h: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteLine.h 3 | // XcodePlus Delete Line 4 | // 5 | // Created by Pay Liu on 13/9/9. 6 | // Copyright (c) 2013年 Octalord Information Inc. The MIT License. 7 | // 8 | 9 | @interface DeleteLine : NSObject 10 | 11 | @property (nonatomic, assign) NSRange selectedLineRange; 12 | @property (nonatomic, strong) NSTextView *currentTextView; 13 | 14 | @end -------------------------------------------------------------------------------- /src/XcodePlugDeleteLine/XcodePlusDeleteLine/Code/DeleteLine/DeleteLine.m: -------------------------------------------------------------------------------- 1 | // 2 | // DeleteLine.h 3 | // XcodePlus Delete Line 4 | // 5 | // Created by Pay Liu on 13/9/9. 6 | // Copyright (c) 2013年 Octalord Information Inc. The MIT License. 7 | // 8 | 9 | #import "DeleteLine.h" 10 | 11 | @interface DeleteLine () 12 | 13 | @property(nonatomic, strong) NSString *deletedText; 14 | 15 | @end 16 | 17 | #import 18 | 19 | @implementation DeleteLine 20 | 21 | - (void)dealloc { 22 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 23 | } 24 | 25 | + (void)pluginDidLoad:(NSBundle *)plugin { 26 | static id shared = nil; 27 | 28 | static dispatch_once_t onceToken; 29 | 30 | dispatch_once(&onceToken, ^{ shared = [[self alloc] init]; }); 31 | } 32 | 33 | - (id)init { 34 | self = [super init]; 35 | 36 | if (self) { 37 | 38 | [[NSNotificationCenter defaultCenter] 39 | addObserver:self 40 | selector:@selector(applicationDidFinishLaunching:) 41 | name:NSApplicationDidFinishLaunchingNotification 42 | object:nil]; 43 | } 44 | 45 | return self; 46 | } 47 | 48 | - (void)applicationDidFinishLaunching:(NSNotification *)notification { 49 | [[NSNotificationCenter defaultCenter] 50 | addObserver:self 51 | selector:@selector(selectionDidChange:) 52 | name:NSTextViewDidChangeSelectionNotification 53 | object:nil]; 54 | 55 | NSMenuItem *editMenuItem = [[NSApp mainMenu] itemWithTitle:@"Edit"]; 56 | 57 | if (editMenuItem) { 58 | [[editMenuItem submenu] addItem:[NSMenuItem separatorItem]]; 59 | 60 | NSMenuItem *newMenuItem = 61 | [[NSMenuItem alloc] initWithTitle:@"Delete Line" 62 | action:@selector(deleteLine:) 63 | keyEquivalent:@"d"]; 64 | 65 | [newMenuItem setTarget:self]; 66 | [newMenuItem setKeyEquivalentModifierMask:NSCommandKeyMask]; 67 | [[editMenuItem submenu] addItem:newMenuItem]; 68 | } 69 | } 70 | 71 | - (void)selectionDidChange:(NSNotification *)notification { 72 | if ([[notification object] isKindOfClass:[NSTextView class]]) { 73 | 74 | self.currentTextView = (NSTextView *)[notification object]; 75 | 76 | NSArray *selectedRanges = [self.currentTextView selectedRanges]; 77 | 78 | if (selectedRanges.count == 0) { 79 | return; 80 | } 81 | 82 | NSRange selectedRange = [[selectedRanges objectAtIndex:0] rangeValue]; 83 | 84 | self.selectedLineRange = [self.currentTextView.textStorage.string 85 | lineRangeForRange:selectedRange]; 86 | 87 | self.deletedText = [self.currentTextView.textStorage.string 88 | substringWithRange:self.selectedLineRange]; 89 | } 90 | } 91 | 92 | - (void)showMessageBox:(NSString *)text { 93 | NSAlert *alert = [[NSAlert alloc] init]; 94 | 95 | [alert setMessageText:text]; 96 | [alert runModal]; 97 | } 98 | 99 | - (void)deleteLine:(id)sender { 100 | // [self showMessageBox:self.deletedText]; 101 | 102 | if ([self.currentTextView shouldChangeTextInRange:self.selectedLineRange 103 | replacementString:@""]) { 104 | 105 | [self.currentTextView.textStorage 106 | replaceCharactersInRange:self.selectedLineRange 107 | withAttributedString:[[NSAttributedString alloc] 108 | initWithString:@""]]; 109 | 110 | [self.currentTextView didChangeText]; 111 | } 112 | } 113 | 114 | @end 115 | -------------------------------------------------------------------------------- /src/XcodePlugDeleteLine/XcodePlusDeleteLine/XcodePlus Delete Line-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.octalord.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0.1 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0.1 25 | DVTPlugInCompatibilityUUIDs 26 | 27 | E969541F-E6F9-4D25-8158-72DC3545A6C6 28 | A2E4D43F-41F4-4FB9-BB94-7177011C9AED 29 | 63FC1C47-140D-42B0-BB4D-A10B2D225574 30 | 37B30044-3B14-46BA-ABAA-F01000C27B63 31 | AD68E85B-441B-4301-B564-A45E4919A6AD 32 | C4A681B0-4A26-480E-93EC-1218098B9AA0 33 | FEC992CC-CA4A-4CFD-8881-77300FCB848A 34 | 640F884E-CE55-4B40-87C0-8869546CAB7A 35 | 992275C1-432A-4CF7-B659-D84ED6D42D3F 36 | A16FF353-8441-459E-A50C-B071F53F51B7 37 | 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90 38 | 0420B86A-AA43-4792-9ED0-6FE0F2B16A13 39 | 7265231C-39B4-402C-89E1-16167C4CC990 40 | F41BD31E-2683-44B8-AE7F-5F09E919790E 41 | ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C 42 | 43 | NSHumanReadableCopyright 44 | Copyright © 2013年 Octalord Information Inc. All rights reserved. 45 | NSPrincipalClass 46 | DeleteLine 47 | XC4Compatible 48 | 49 | XCGCReady 50 | 51 | XCPluginHasUI 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/XcodePlugDeleteLine/XcodePlusDeleteLine/XcodePlus Delete Line-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'XcodePlusDeleteLines' target in the 'XcodePlusDeleteLines' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /src/XcodePlugDeleteLine/XcodePlusDeleteLine/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /src/XcodePlugDeleteLine/uncrustify.cfg: -------------------------------------------------------------------------------- 1 | # Uncrustify 0.60 2 | 3 | # 4 | # General options 5 | # 6 | 7 | # The type of line endings 8 | newlines = auto # auto/lf/crlf/cr 9 | 10 | # The original size of tabs in the input 11 | input_tab_size = 8 # number 12 | 13 | # The size of tabs in the output (only used if align_with_tabs=true) 14 | output_tab_size = 8 # number 15 | 16 | # The ASCII value of the string escape char, usually 92 (\) or 94 (^). (Pawn) 17 | string_escape_char = 92 # number 18 | 19 | # Alternate string escape char for Pawn. Only works right before the quote char. 20 | string_escape_char2 = 0 # number 21 | 22 | # Allow interpreting '>=' and '>>=' as part of a template in 'void f(list>=val);'. 23 | # If true (default), 'assert(x<0 && y>=3)' will be broken. 24 | # Improvements to template detection may make this option obsolete. 25 | tok_split_gte = false # false/true 26 | 27 | # Control what to do with the UTF-8 BOM (recommend 'remove') 28 | utf8_bom = ignore # ignore/add/remove/force 29 | 30 | # If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8 31 | utf8_byte = false # false/true 32 | 33 | # Force the output encoding to UTF-8 34 | utf8_force = false # false/true 35 | 36 | # 37 | # Indenting 38 | # 39 | 40 | # The number of columns to indent per level. 41 | # Usually 2, 3, 4, or 8. 42 | indent_columns = 4 # number 43 | 44 | # The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents. 45 | # For FreeBSD, this is set to 4. Negative value is absolute and not increased for each ( level 46 | indent_continue = 0 # number 47 | 48 | # How to use tabs when indenting code 49 | # 0=spaces only 50 | # 1=indent with tabs to brace level, align with spaces 51 | # 2=indent and align with tabs, using spaces when not on a tabstop 52 | indent_with_tabs = 0 # number 53 | 54 | # Comments that are not a brace level are indented with tabs on a tabstop. 55 | # Requires indent_with_tabs=2. If false, will use spaces. 56 | indent_cmt_with_tabs = false # false/true 57 | 58 | # Whether to indent strings broken by '\' so that they line up 59 | indent_align_string = false # false/true 60 | 61 | # The number of spaces to indent multi-line XML strings. 62 | # Requires indent_align_string=True 63 | indent_xml_string = 0 # number 64 | 65 | # Spaces to indent '{' from level 66 | indent_brace = 0 # number 67 | 68 | # Whether braces are indented to the body level 69 | indent_braces = false # false/true 70 | 71 | # Disabled indenting function braces if indent_braces is true 72 | indent_braces_no_func = false # false/true 73 | 74 | # Disabled indenting class braces if indent_braces is true 75 | indent_braces_no_class = false # false/true 76 | 77 | # Disabled indenting struct braces if indent_braces is true 78 | indent_braces_no_struct = false # false/true 79 | 80 | # Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc. 81 | indent_brace_parent = false # false/true 82 | 83 | # Whether the 'namespace' body is indented 84 | indent_namespace = false # false/true 85 | 86 | # The number of spaces to indent a namespace block 87 | indent_namespace_level = 0 # number 88 | 89 | # If the body of the namespace is longer than this number, it won't be indented. 90 | # Requires indent_namespace=true. Default=0 (no limit) 91 | indent_namespace_limit = 0 # number 92 | 93 | # Whether the 'extern "C"' body is indented 94 | indent_extern = false # false/true 95 | 96 | # Whether the 'class' body is indented 97 | indent_class = false # false/true 98 | 99 | # Whether to indent the stuff after a leading class colon 100 | indent_class_colon = false # false/true 101 | 102 | # Virtual indent from the ':' for member initializers. Default is 2 103 | indent_ctor_init_leading = 2 # number 104 | 105 | # Additional indenting for constructor initializer list 106 | indent_ctor_init = 0 # number 107 | 108 | # False=treat 'else\nif' as 'else if' for indenting purposes 109 | # True=indent the 'if' one level 110 | indent_else_if = false # false/true 111 | 112 | # Amount to indent variable declarations after a open brace. neg=relative, pos=absolute 113 | indent_var_def_blk = 0 # number 114 | 115 | # Indent continued variable declarations instead of aligning. 116 | indent_var_def_cont = false # false/true 117 | 118 | # True: force indentation of function definition to start in column 1 119 | # False: use the default behavior 120 | indent_func_def_force_col1 = false # false/true 121 | 122 | # True: indent continued function call parameters one indent level 123 | # False: align parameters under the open paren 124 | indent_func_call_param = false # false/true 125 | 126 | # Same as indent_func_call_param, but for function defs 127 | indent_func_def_param = false # false/true 128 | 129 | # Same as indent_func_call_param, but for function protos 130 | indent_func_proto_param = false # false/true 131 | 132 | # Same as indent_func_call_param, but for class declarations 133 | indent_func_class_param = false # false/true 134 | 135 | # Same as indent_func_call_param, but for class variable constructors 136 | indent_func_ctor_var_param = false # false/true 137 | 138 | # Same as indent_func_call_param, but for templates 139 | indent_template_param = false # false/true 140 | 141 | # Double the indent for indent_func_xxx_param options 142 | indent_func_param_double = false # false/true 143 | 144 | # Indentation column for standalone 'const' function decl/proto qualifier 145 | indent_func_const = 0 # number 146 | 147 | # Indentation column for standalone 'throw' function decl/proto qualifier 148 | indent_func_throw = 0 # number 149 | 150 | # The number of spaces to indent a continued '->' or '.' 151 | # Usually set to 0, 1, or indent_columns. 152 | indent_member = 0 # number 153 | 154 | # Spaces to indent single line ('//') comments on lines before code 155 | indent_sing_line_comments = 0 # number 156 | 157 | # If set, will indent trailing single line ('//') comments relative 158 | # to the code instead of trying to keep the same absolute column 159 | indent_relative_single_line_comments = false # false/true 160 | 161 | # Spaces to indent 'case' from 'switch' 162 | # Usually 0 or indent_columns. 163 | # ok, 4 spaces 164 | indent_switch_case = 4 # number 165 | 166 | # Spaces to shift the 'case' line, without affecting any other lines 167 | # Usually 0. 168 | indent_case_shift = 0 # number 169 | 170 | # Spaces to indent '{' from 'case'. 171 | # By default, the brace will appear under the 'c' in case. 172 | # Usually set to 0 or indent_columns. 173 | indent_case_brace = 0 # number 174 | 175 | # Whether to indent comments found in first column 176 | indent_col1_comment = false # false/true 177 | 178 | # How to indent goto labels 179 | # >0 : absolute column where 1 is the leftmost column 180 | # <=0 : subtract from brace indent 181 | indent_label = 1 # number 182 | 183 | # Same as indent_label, but for access specifiers that are followed by a colon 184 | indent_access_spec = 1 # number 185 | 186 | # Indent the code after an access specifier by one level. 187 | # If set, this option forces 'indent_access_spec=0' 188 | indent_access_spec_body = false # false/true 189 | 190 | # If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended) 191 | indent_paren_nl = false # false/true 192 | 193 | # Controls the indent of a close paren after a newline. 194 | # 0: Indent to body level 195 | # 1: Align under the open paren 196 | # 2: Indent to the brace level 197 | indent_paren_close = 0 # number 198 | 199 | # Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren 200 | indent_comma_paren = false # false/true 201 | 202 | # Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren 203 | indent_bool_paren = false # false/true 204 | 205 | # If 'indent_bool_paren' is true, controls the indent of the first expression. If TRUE, aligns the first expression to the following ones 206 | indent_first_bool_expr = false # false/true 207 | 208 | # If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended) 209 | indent_square_nl = false # false/true 210 | 211 | # Don't change the relative indent of ESQL/C 'EXEC SQL' bodies 212 | indent_preserve_sql = false # false/true 213 | 214 | # Align continued statements at the '='. Default=True 215 | # If FALSE or the '=' is followed by a newline, the next line is indent one tab. 216 | indent_align_assign = true # false/true 217 | 218 | # Indent OC blocks at brace level instead of usual rules. 219 | # ok, true 220 | indent_oc_block = true # false/true 221 | 222 | # Indent OC blocks in a message relative to the parameter name. 223 | # 0=use indent_oc_block rules, 1+=spaces to indent 224 | # ok, 0 225 | indent_oc_block_msg = 0 # number 226 | 227 | # Minimum indent for subsequent parameters 228 | # check 0 229 | indent_oc_msg_colon = 0 # number 230 | 231 | # 232 | # Spacing options 233 | # 234 | 235 | # Add or remove space around arithmetic operator '+', '-', '/', '*', etc 236 | # ok, force 237 | sp_arith = force # ignore/add/remove/force 238 | 239 | # Add or remove space around assignment operator '=', '+=', etc 240 | # ok, force 241 | sp_assign = force # ignore/add/remove/force 242 | 243 | # Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign 244 | sp_cpp_lambda_assign = ignore # ignore/add/remove/force 245 | 246 | # Add or remove space after the capture specification in C++11 lambda. 247 | sp_cpp_lambda_paren = ignore # ignore/add/remove/force 248 | 249 | # Add or remove space around assignment operator '=' in a prototype 250 | # ok, force 251 | sp_assign_default = force # ignore/add/remove/force 252 | 253 | # Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign. 254 | # ok, force 255 | sp_before_assign = force # ignore/add/remove/force 256 | 257 | # Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign. 258 | # ok, force 259 | sp_after_assign = force # ignore/add/remove/force 260 | 261 | # Add or remove space around assignment '=' in enum 262 | sp_enum_assign = ignore # ignore/add/remove/force 263 | 264 | # Add or remove space before assignment '=' in enum. Overrides sp_enum_assign. 265 | sp_enum_before_assign = ignore # ignore/add/remove/force 266 | 267 | # Add or remove space after assignment '=' in enum. Overrides sp_enum_assign. 268 | sp_enum_after_assign = ignore # ignore/add/remove/force 269 | 270 | # Add or remove space around preprocessor '##' concatenation operator. Default=Add 271 | sp_pp_concat = add # ignore/add/remove/force 272 | 273 | # Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. 274 | sp_pp_stringify = ignore # ignore/add/remove/force 275 | 276 | # Add or remove space before preprocessor '#' stringify operator as in '#define x(y) L#y'. 277 | sp_before_pp_stringify = ignore # ignore/add/remove/force 278 | 279 | # Add or remove space around boolean operators '&&' and '||' 280 | # ok, force 281 | sp_bool = force # ignore/add/remove/force 282 | 283 | # Add or remove space around compare operator '<', '>', '==', etc 284 | # ok, force 285 | sp_compare = force # ignore/add/remove/force 286 | 287 | # Add or remove space inside '(' and ')' 288 | # ok, remove 289 | sp_inside_paren = remove # ignore/add/remove/force 290 | 291 | # Add or remove space between nested parens 292 | # ok, remove, force will add more space, ex: NSStringFromSelector(@selector(request:onFailure:path:) ) ) 293 | sp_paren_paren = remove # ignore/add/remove/force 294 | 295 | # Whether to balance spaces inside nested parens 296 | sp_balance_nested_parens = false # false/true 297 | 298 | # Add or remove space between ')' and '{' 299 | # ok, force 300 | sp_paren_brace = force # ignore/add/remove/force 301 | 302 | # Add or remove space before pointer star '*' 303 | # ok, force 304 | sp_before_ptr_star = force # ignore/add/remove/force 305 | 306 | # Add or remove space before pointer star '*' that isn't followed by a variable name 307 | # If set to 'ignore', sp_before_ptr_star is used instead. 308 | sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force 309 | 310 | # Add or remove space between pointer stars '*' 311 | sp_between_ptr_star = ignore # ignore/add/remove/force 312 | 313 | # Add or remove space after pointer star '*', if followed by a word. 314 | # ok, remove 315 | sp_after_ptr_star = remove # ignore/add/remove/force 316 | 317 | # Add or remove space after a pointer star '*', if followed by a func proto/def. 318 | # ok, force 319 | sp_after_ptr_star_func = force # ignore/add/remove/force 320 | 321 | # Add or remove space after a pointer star '*', if followed by an open paren (function types). 322 | # ok, remove 323 | sp_ptr_star_paren = remove # ignore/add/remove/force 324 | 325 | # Add or remove space before a pointer star '*', if followed by a func proto/def. 326 | # ok, remove 327 | sp_before_ptr_star_func = remove # ignore/add/remove/force 328 | 329 | # Add or remove space before a reference sign '&' 330 | # ok, remove 331 | sp_before_byref = remove # ignore/add/remove/force 332 | 333 | # Add or remove space before a reference sign '&' that isn't followed by a variable name 334 | # If set to 'ignore', sp_before_byref is used instead. 335 | sp_before_unnamed_byref = ignore # ignore/add/remove/force 336 | 337 | # Add or remove space after reference sign '&', if followed by a word. 338 | sp_after_byref = ignore # ignore/add/remove/force 339 | 340 | # Add or remove space after a reference sign '&', if followed by a func proto/def. 341 | sp_after_byref_func = ignore # ignore/add/remove/force 342 | 343 | # Add or remove space before a reference sign '&', if followed by a func proto/def. 344 | sp_before_byref_func = ignore # ignore/add/remove/force 345 | 346 | # Add or remove space between type and word. Default=Force 347 | # ok, force 348 | sp_after_type = force # ignore/add/remove/force 349 | 350 | # Add or remove space before the paren in the D constructs 'template Foo(' and 'class Foo('. 351 | sp_before_template_paren = ignore # ignore/add/remove/force 352 | 353 | # Add or remove space in 'template <' vs 'template<'. 354 | # If set to ignore, sp_before_angle is used. 355 | sp_template_angle = ignore # ignore/add/remove/force 356 | 357 | # Add or remove space before '<>' 358 | sp_before_angle = ignore # ignore/add/remove/force 359 | 360 | # Add or remove space inside '<' and '>' 361 | sp_inside_angle = ignore # ignore/add/remove/force 362 | 363 | # Add or remove space after '<>' 364 | sp_after_angle = ignore # ignore/add/remove/force 365 | 366 | # Add or remove space between '<>' and '(' as found in 'new List();' 367 | sp_angle_paren = ignore # ignore/add/remove/force 368 | 369 | # Add or remove space between '<>' and a word as in 'List m;' 370 | sp_angle_word = ignore # ignore/add/remove/force 371 | 372 | # Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add 373 | sp_angle_shift = add # ignore/add/remove/force 374 | 375 | # Permit removal of the space between '>>' in 'foo >' (C++11 only). Default=False 376 | # sp_angle_shift cannot remove the space without this option. 377 | sp_permit_cpp11_shift = false # false/true 378 | 379 | # Add or remove space before '(' of 'if', 'for', 'switch', and 'while' 380 | # ok, force 381 | sp_before_sparen = force # ignore/add/remove/force 382 | 383 | # Add or remove space inside if-condition '(' and ')' 384 | # ok, force 385 | sp_inside_sparen = force # ignore/add/remove/force 386 | 387 | # Add or remove space before if-condition ')'. Overrides sp_inside_sparen. 388 | # ok, remove 389 | sp_inside_sparen_close = remove # ignore/add/remove/force 390 | 391 | # Add or remove space before if-condition '('. Overrides sp_inside_sparen. 392 | # ok, remove 393 | sp_inside_sparen_open = remove # ignore/add/remove/force 394 | 395 | # Add or remove space after ')' of 'if', 'for', 'switch', and 'while' 396 | # ok, force 397 | sp_after_sparen = force # ignore/add/remove/force 398 | 399 | # Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while' 400 | # ok, force 401 | sp_sparen_brace = force # ignore/add/remove/force 402 | 403 | # Add or remove space between 'invariant' and '(' in the D language. 404 | sp_invariant_paren = ignore # ignore/add/remove/force 405 | 406 | # Add or remove space after the ')' in 'invariant (C) c' in the D language. 407 | sp_after_invariant_paren = ignore # ignore/add/remove/force 408 | 409 | # Add or remove space before empty statement ';' on 'if', 'for' and 'while' 410 | # ok, force 411 | sp_special_semi = force # ignore/add/remove/force 412 | 413 | # Add or remove space before ';'. Default=Remove 414 | sp_before_semi = remove # ignore/add/remove/force 415 | 416 | # Add or remove space before ';' in non-empty 'for' statements 417 | sp_before_semi_for = ignore # ignore/add/remove/force 418 | 419 | # Add or remove space before a semicolon of an empty part of a for statement. 420 | sp_before_semi_for_empty = ignore # ignore/add/remove/force 421 | 422 | # Add or remove space after ';', except when followed by a comment. Default=Add 423 | sp_after_semi = add # ignore/add/remove/force 424 | 425 | # Add or remove space after ';' in non-empty 'for' statements. Default=Force 426 | sp_after_semi_for = force # ignore/add/remove/force 427 | 428 | # Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; ). 429 | # ok, remove 430 | sp_after_semi_for_empty = remove # ignore/add/remove/force 431 | 432 | # Add or remove space before '[' (except '[]') 433 | # ok, remove, NSArray *aa = @[ @233, @33 ]; 434 | sp_before_square = remove # ignore/add/remove/force 435 | 436 | # Add or remove space before '[]' 437 | # ok, remove, NSArray *aa = @[]; 438 | sp_before_squares = remove # ignore/add/remove/force 439 | 440 | # Add or remove space inside a non-empty '[' and ']' 441 | # ok, remove, NSArray *aa = @[ @233, @33 ]; 442 | sp_inside_square = remove # ignore/add/remove/force 443 | 444 | # Add or remove space after ',' 445 | # ok, force 446 | sp_after_comma = force # ignore/add/remove/force 447 | 448 | # Add or remove space before ',' 449 | sp_before_comma = remove # ignore/add/remove/force 450 | 451 | # Add or remove space between an open paren and comma: '(,' vs '( ,' 452 | sp_paren_comma = force # ignore/add/remove/force 453 | 454 | # Add or remove space before the variadic '...' when preceded by a non-punctuator 455 | sp_before_ellipsis = ignore # ignore/add/remove/force 456 | 457 | # Add or remove space after class ':' 458 | # ok, force 459 | sp_after_class_colon = force # ignore/add/remove/force 460 | 461 | # Add or remove space before class ':' 462 | # ok, force 463 | sp_before_class_colon = force # ignore/add/remove/force 464 | 465 | # Add or remove space before case ':'. Default=Remove 466 | sp_before_case_colon = remove # ignore/add/remove/force 467 | 468 | # Add or remove space between 'operator' and operator sign 469 | # ok, force 470 | sp_after_operator = force # ignore/add/remove/force 471 | 472 | # Add or remove space between the operator symbol and the open paren, as in 'operator ++(' 473 | sp_after_operator_sym = ignore # ignore/add/remove/force 474 | 475 | # Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a' 476 | sp_after_cast = ignore # ignore/add/remove/force 477 | 478 | # Add or remove spaces inside cast parens 479 | sp_inside_paren_cast = ignore # ignore/add/remove/force 480 | 481 | # Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)' 482 | sp_cpp_cast_paren = ignore # ignore/add/remove/force 483 | 484 | # Add or remove space between 'sizeof' and '(' 485 | sp_sizeof_paren = remove # ignore/add/remove/force 486 | 487 | # Add or remove space after the tag keyword (Pawn) 488 | sp_after_tag = ignore # ignore/add/remove/force 489 | 490 | # Add or remove space inside enum '{' and '}' 491 | sp_inside_braces_enum = force # ignore/add/remove/force 492 | 493 | # Add or remove space inside struct/union '{' and '}' 494 | sp_inside_braces_struct = force # ignore/add/remove/force 495 | 496 | # Add or remove space inside '{' and '}' 497 | sp_inside_braces = force # ignore/add/remove/force 498 | 499 | # Add or remove space inside '{}' 500 | sp_inside_braces_empty = force # ignore/add/remove/force 501 | 502 | # Add or remove space between return type and function name 503 | # A minimum of 1 is forced except for pointer return types. 504 | # ok, force 505 | sp_type_func = force # ignore/add/remove/force 506 | 507 | # Add or remove space between function name and '(' on function declaration 508 | # ok, remove 509 | sp_func_proto_paren = remove # ignore/add/remove/force 510 | 511 | # Add or remove space between function name and '(' on function definition 512 | sp_func_def_paren = remove # ignore/add/remove/force 513 | 514 | # Add or remove space inside empty function '()' 515 | # ok, remove 516 | sp_inside_fparens = remove # ignore/add/remove/force 517 | 518 | # Add or remove space inside function '(' and ')' 519 | # ok, remove 520 | sp_inside_fparen = remove # ignore/add/remove/force 521 | 522 | # Add or remove space inside the first parens in the function type: 'void (*x)(...)' 523 | # ok, remove, typedef void( ^OnClose)(void) 524 | sp_inside_tparen = remove # ignore/add/remove/force 525 | 526 | # Add or remove between the parens in the function type: 'void (*x)(...)' 527 | sp_after_tparen_close = ignore # ignore/add/remove/force 528 | 529 | # Add or remove space between ']' and '(' when part of a function call. 530 | sp_square_fparen = ignore # ignore/add/remove/force 531 | 532 | # Add or remove space between ')' and '{' of function 533 | # ok, force 534 | sp_fparen_brace = force # ignore/add/remove/force 535 | 536 | # Add or remove space between function name and '(' on function calls 537 | sp_func_call_paren = remove # ignore/add/remove/force 538 | 539 | # Add or remove space between function name and '()' on function calls without parameters. 540 | # If set to 'ignore' (the default), sp_func_call_paren is used. 541 | sp_func_call_paren_empty = ignore # ignore/add/remove/force 542 | 543 | # Add or remove space between the user function name and '(' on function calls 544 | # You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file. 545 | sp_func_call_user_paren = ignore # ignore/add/remove/force 546 | 547 | # Add or remove space between a constructor/destructor and the open paren 548 | sp_func_class_paren = ignore # ignore/add/remove/force 549 | 550 | # Add or remove space between 'return' and '(' 551 | # ok, force 552 | sp_return_paren = force # ignore/add/remove/force 553 | 554 | # Add or remove space between '__attribute__' and '(' 555 | sp_attribute_paren = ignore # ignore/add/remove/force 556 | 557 | # Add or remove space between 'defined' and '(' in '#if defined (FOO)' 558 | sp_defined_paren = ignore # ignore/add/remove/force 559 | 560 | # Add or remove space between 'throw' and '(' in 'throw (something)' 561 | sp_throw_paren = ignore # ignore/add/remove/force 562 | 563 | # Add or remove space between 'throw' and anything other than '(' as in '@throw [...];' 564 | sp_after_throw = ignore # ignore/add/remove/force 565 | 566 | # Add or remove space between 'catch' and '(' in 'catch (something) { }' 567 | # If set to ignore, sp_before_sparen is used. 568 | sp_catch_paren = ignore # ignore/add/remove/force 569 | 570 | # Add or remove space between 'version' and '(' in 'version (something) { }' (D language) 571 | # If set to ignore, sp_before_sparen is used. 572 | sp_version_paren = ignore # ignore/add/remove/force 573 | 574 | # Add or remove space between 'scope' and '(' in 'scope (something) { }' (D language) 575 | # If set to ignore, sp_before_sparen is used. 576 | sp_scope_paren = ignore # ignore/add/remove/force 577 | 578 | # Add or remove space between macro and value 579 | sp_macro = ignore # ignore/add/remove/force 580 | 581 | # Add or remove space between macro function ')' and value 582 | sp_macro_func = ignore # ignore/add/remove/force 583 | 584 | # Add or remove space between 'else' and '{' if on the same line 585 | # ok, force 586 | sp_else_brace = force # ignore/add/remove/force 587 | 588 | # Add or remove space between '}' and 'else' if on the same line 589 | # ok, force 590 | sp_brace_else = force # ignore/add/remove/force 591 | 592 | # Add or remove space between '}' and the name of a typedef on the same line 593 | sp_brace_typedef = ignore # ignore/add/remove/force 594 | 595 | # Add or remove space between 'catch' and '{' if on the same line 596 | # ok, force 597 | sp_catch_brace = force # ignore/add/remove/force 598 | 599 | # Add or remove space between '}' and 'catch' if on the same line 600 | # ok, force 601 | sp_brace_catch = force # ignore/add/remove/force 602 | 603 | # Add or remove space between 'finally' and '{' if on the same line 604 | # ok, force 605 | sp_finally_brace = force # ignore/add/remove/force 606 | 607 | # Add or remove space between '}' and 'finally' if on the same line 608 | # ok, force 609 | sp_brace_finally = force # ignore/add/remove/force 610 | 611 | # Add or remove space between 'try' and '{' if on the same line 612 | # ok, force 613 | sp_try_brace = force # ignore/add/remove/force 614 | 615 | # Add or remove space between get/set and '{' if on the same line 616 | sp_getset_brace = force # ignore/add/remove/force 617 | 618 | # Add or remove space before the '::' operator 619 | sp_before_dc = ignore # ignore/add/remove/force 620 | 621 | # Add or remove space after the '::' operator 622 | sp_after_dc = ignore # ignore/add/remove/force 623 | 624 | # Add or remove around the D named array initializer ':' operator 625 | sp_d_array_colon = ignore # ignore/add/remove/force 626 | 627 | # Add or remove space after the '!' (not) operator. Default=Remove 628 | sp_not = remove # ignore/add/remove/force 629 | 630 | # Add or remove space after the '~' (invert) operator. Default=Remove 631 | sp_inv = remove # ignore/add/remove/force 632 | 633 | # Add or remove space after the '&' (address-of) operator. Default=Remove 634 | # This does not affect the spacing after a '&' that is part of a type. 635 | sp_addr = remove # ignore/add/remove/force 636 | 637 | # Add or remove space around the '.' or '->' operators. Default=Remove 638 | sp_member = remove # ignore/add/remove/force 639 | 640 | # Add or remove space after the '*' (dereference) operator. Default=Remove 641 | # This does not affect the spacing after a '*' that is part of a type. 642 | sp_deref = remove # ignore/add/remove/force 643 | 644 | # Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove 645 | sp_sign = remove # ignore/add/remove/force 646 | 647 | # Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove 648 | sp_incdec = remove # ignore/add/remove/force 649 | 650 | # Add or remove space before a backslash-newline at the end of a line. Default=Add 651 | sp_before_nl_cont = add # ignore/add/remove/force 652 | 653 | # Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;' 654 | # ok, force 655 | sp_after_oc_scope = force # ignore/add/remove/force 656 | 657 | # Add or remove space after the colon in message specs 658 | # '-(int) f:(int) x;' vs '-(int) f: (int) x;' 659 | # ok, remove 660 | sp_after_oc_colon = remove # ignore/add/remove/force 661 | 662 | # Add or remove space before the colon in message specs 663 | # '-(int) f: (int) x;' vs '-(int) f : (int) x;' 664 | # ok, remove 665 | sp_before_oc_colon = remove # ignore/add/remove/force 666 | 667 | # Add or remove space after the colon in immutable dictionary expression 668 | # 'NSDictionary *test = @{@"foo" :@"bar"};' 669 | # ok, force 670 | sp_after_oc_dict_colon = force # ignore/add/remove/force 671 | 672 | # Add or remove space before the colon in immutable dictionary expression 673 | # 'NSDictionary *test = @{@"foo" :@"bar"};' 674 | # ok, force 675 | sp_before_oc_dict_colon = force # ignore/add/remove/force 676 | 677 | # Add or remove space after the colon in message specs 678 | # '[object setValue:1];' vs '[object setValue: 1];' 679 | # ok, remove 680 | sp_after_send_oc_colon = remove # ignore/add/remove/force 681 | 682 | # Add or remove space before the colon in message specs 683 | # '[object setValue:1];' vs '[object setValue :1];' 684 | # ok, remove 685 | sp_before_send_oc_colon = remove # ignore/add/remove/force 686 | 687 | # Add or remove space after the (type) in message specs 688 | # '-(int)f: (int) x;' vs '-(int)f: (int)x;' 689 | # ok, remove 690 | sp_after_oc_type = remove # ignore/add/remove/force 691 | 692 | # Add or remove space after the first (type) in message specs 693 | # '-(int) f:(int)x;' vs '-(int)f:(int)x;' 694 | # ok, force 695 | sp_after_oc_return_type = force # ignore/add/remove/force 696 | 697 | # Add or remove space between '@selector' and '(' 698 | # '@selector(msgName)' vs '@selector (msgName)' 699 | # Also applies to @protocol() constructs 700 | # ok, remove 701 | sp_after_oc_at_sel = remove # ignore/add/remove/force 702 | 703 | # Add or remove space between '@selector(x)' and the following word 704 | # '@selector(foo) a:' vs '@selector(foo)a:' 705 | # ok, force 706 | sp_after_oc_at_sel_parens = force # ignore/add/remove/force 707 | 708 | # Add or remove space inside '@selector' parens 709 | # '@selector(foo)' vs '@selector( foo )' 710 | # Also applies to @protocol() constructs 711 | # ok, remove 712 | sp_inside_oc_at_sel_parens = remove # ignore/add/remove/force 713 | 714 | # Add or remove space before a block pointer caret 715 | # '^int (int arg){...}' vs. ' ^int (int arg){...}' 716 | # ok, remove 717 | sp_before_oc_block_caret = remove # ignore/add/remove/force 718 | 719 | # Add or remove space after a block pointer caret 720 | # '^int (int arg){...}' vs. '^ int (int arg){...}' 721 | # ok, remove 722 | sp_after_oc_block_caret = remove # ignore/add/remove/force 723 | 724 | # Add or remove space between the receiver and selector in a message. 725 | # '[receiver selector ...]' 726 | # ok, force, ex: [[[basic copy]aaa]bbb]; -> [[[basic copy] aaa] bbb]; 727 | sp_after_oc_msg_receiver = force # ignore/add/remove/force 728 | 729 | # Add or remove space after @property. 730 | # ok, force 731 | sp_after_oc_property = force # ignore/add/remove/force 732 | 733 | # Add or remove space around the ':' in 'b ? t : f' 734 | # ok, force 735 | sp_cond_colon = force # ignore/add/remove/force 736 | 737 | # Add or remove space around the '?' in 'b ? t : f' 738 | # ok, force 739 | sp_cond_question = force # ignore/add/remove/force 740 | 741 | # Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here. 742 | sp_case_label = ignore # ignore/add/remove/force 743 | 744 | # Control the space around the D '..' operator. 745 | sp_range = ignore # ignore/add/remove/force 746 | 747 | # Control the spacing after ':' in 'for (TYPE VAR : EXPR)' (Java) 748 | sp_after_for_colon = force # ignore/add/remove/force 749 | 750 | # Control the spacing before ':' in 'for (TYPE VAR : EXPR)' (Java) 751 | sp_before_for_colon = force # ignore/add/remove/force 752 | 753 | # Control the spacing in 'extern (C)' (D) 754 | sp_extern_paren = ignore # ignore/add/remove/force 755 | 756 | # Control the space after the opening of a C++ comment '// A' vs '//A' 757 | # ok, force 758 | sp_cmt_cpp_start = force # ignore/add/remove/force 759 | 760 | # Controls the spaces between #else or #endif and a trailing comment 761 | sp_endif_cmt = ignore # ignore/add/remove/force 762 | 763 | # Controls the spaces after 'new', 'delete', and 'delete[]' 764 | sp_after_new = ignore # ignore/add/remove/force 765 | 766 | # Controls the spaces before a trailing or embedded comment 767 | sp_before_tr_emb_cmt = ignore # ignore/add/remove/force 768 | 769 | # Number of spaces before a trailing or embedded comment 770 | sp_num_before_tr_emb_cmt = 0 # number 771 | 772 | # Control space between a Java annotation and the open paren. 773 | sp_annotation_paren = ignore # ignore/add/remove/force 774 | 775 | # 776 | # Code alignment (not left column spaces/tabs) 777 | # 778 | 779 | # Whether to keep non-indenting tabs 780 | align_keep_tabs = false # false/true 781 | 782 | # Whether to use tabs for aligning 783 | align_with_tabs = false # false/true 784 | 785 | # Whether to bump out to the next tab when aligning 786 | align_on_tabstop = false # false/true 787 | 788 | # Whether to left-align numbers 789 | align_number_left = false # false/true 790 | 791 | # Align variable definitions in prototypes and functions 792 | align_func_params = false # false/true 793 | 794 | # Align parameters in single-line functions that have the same name. 795 | # The function names must already be aligned with each other. 796 | align_same_func_call_params = false # false/true 797 | 798 | # The span for aligning variable definitions (0=don't align) 799 | align_var_def_span = 0 # number 800 | 801 | # How to align the star in variable definitions. 802 | # 0=Part of the type 'void * foo;' 803 | # 1=Part of the variable 'void *foo;' 804 | # 2=Dangling 'void *foo;' 805 | align_var_def_star_style = 0 # number 806 | 807 | # How to align the '&' in variable definitions. 808 | # 0=Part of the type 809 | # 1=Part of the variable 810 | # 2=Dangling 811 | align_var_def_amp_style = 0 # number 812 | 813 | # The threshold for aligning variable definitions (0=no limit) 814 | align_var_def_thresh = 0 # number 815 | 816 | # The gap for aligning variable definitions 817 | align_var_def_gap = 0 # number 818 | 819 | # Whether to align the colon in struct bit fields 820 | align_var_def_colon = false # false/true 821 | 822 | # Whether to align any attribute after the variable name 823 | align_var_def_attribute = false # false/true 824 | 825 | # Whether to align inline struct/enum/union variable definitions 826 | align_var_def_inline = false # false/true 827 | 828 | # The span for aligning on '=' in assignments (0=don't align) 829 | align_assign_span = 0 # number 830 | 831 | # The threshold for aligning on '=' in assignments (0=no limit) 832 | align_assign_thresh = 0 # number 833 | 834 | # The span for aligning on '=' in enums (0=don't align) 835 | align_enum_equ_span = 0 # number 836 | 837 | # The threshold for aligning on '=' in enums (0=no limit) 838 | align_enum_equ_thresh = 0 # number 839 | 840 | # The span for aligning struct/union (0=don't align) 841 | align_var_struct_span = 0 # number 842 | 843 | # The threshold for aligning struct/union member definitions (0=no limit) 844 | align_var_struct_thresh = 0 # number 845 | 846 | # The gap for aligning struct/union member definitions 847 | align_var_struct_gap = 0 # number 848 | 849 | # The span for aligning struct initializer values (0=don't align) 850 | align_struct_init_span = 0 # number 851 | 852 | # The minimum space between the type and the synonym of a typedef 853 | align_typedef_gap = 0 # number 854 | 855 | # The span for aligning single-line typedefs (0=don't align) 856 | align_typedef_span = 0 # number 857 | 858 | # How to align typedef'd functions with other typedefs 859 | # 0: Don't mix them at all 860 | # 1: align the open paren with the types 861 | # 2: align the function type name with the other type names 862 | align_typedef_func = 0 # number 863 | 864 | # Controls the positioning of the '*' in typedefs. Just try it. 865 | # 0: Align on typedef type, ignore '*' 866 | # 1: The '*' is part of type name: typedef int *pint; 867 | # 2: The '*' is part of the type, but dangling: typedef int *pint; 868 | align_typedef_star_style = 0 # number 869 | 870 | # Controls the positioning of the '&' in typedefs. Just try it. 871 | # 0: Align on typedef type, ignore '&' 872 | # 1: The '&' is part of type name: typedef int &pint; 873 | # 2: The '&' is part of the type, but dangling: typedef int &pint; 874 | align_typedef_amp_style = 0 # number 875 | 876 | # The span for aligning comments that end lines (0=don't align) 877 | align_right_cmt_span = 0 # number 878 | 879 | # If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment 880 | align_right_cmt_mix = false # false/true 881 | 882 | # If a trailing comment is more than this number of columns away from the text it follows, 883 | # it will qualify for being aligned. This has to be > 0 to do anything. 884 | align_right_cmt_gap = 0 # number 885 | 886 | # Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore) 887 | align_right_cmt_at_col = 0 # number 888 | 889 | # The span for aligning function prototypes (0=don't align) 890 | align_func_proto_span = 0 # number 891 | 892 | # Minimum gap between the return type and the function name. 893 | align_func_proto_gap = 0 # number 894 | 895 | # Align function protos on the 'operator' keyword instead of what follows 896 | align_on_operator = false # false/true 897 | 898 | # Whether to mix aligning prototype and variable declarations. 899 | # If true, align_var_def_XXX options are used instead of align_func_proto_XXX options. 900 | align_mix_var_proto = false # false/true 901 | 902 | # Align single-line functions with function prototypes, uses align_func_proto_span 903 | align_single_line_func = false # false/true 904 | 905 | # Aligning the open brace of single-line functions. 906 | # Requires align_single_line_func=true, uses align_func_proto_span 907 | align_single_line_brace = false # false/true 908 | 909 | # Gap for align_single_line_brace. 910 | align_single_line_brace_gap = 0 # number 911 | 912 | # The span for aligning ObjC msg spec (0=don't align) 913 | align_oc_msg_spec_span = 0 # number 914 | 915 | # Whether to align macros wrapped with a backslash and a newline. 916 | # This will not work right if the macro contains a multi-line comment. 917 | align_nl_cont = false # false/true 918 | 919 | # # Align macro functions and variables together 920 | align_pp_define_together = false # false/true 921 | 922 | # The minimum space between label and value of a preprocessor define 923 | align_pp_define_gap = 0 # number 924 | 925 | # The span for aligning on '#define' bodies (0=don't align) 926 | align_pp_define_span = 0 # number 927 | 928 | # Align lines that start with '<<' with previous '<<'. Default=true 929 | align_left_shift = true # false/true 930 | 931 | # Span for aligning parameters in an Obj-C message call on the ':' (0=don't align) 932 | # ok, 0, 不可以是其他數值, bug: [self aa] -> [selfaaa] 933 | align_oc_msg_colon_span = 0 # number 934 | 935 | # If true, always align with the first parameter, even if it is too short. 936 | # ok, false 937 | align_oc_msg_colon_first = false # false/true 938 | 939 | # Aligning parameters in an Obj-C '+' or '-' declaration on the ':' 940 | align_oc_decl_colon = false # false/true 941 | 942 | # 943 | # Newline adding and removing options 944 | # 945 | 946 | # Whether to collapse empty blocks between '{' and '}' 947 | # ok, false 948 | nl_collapse_empty_body = false # false/true 949 | 950 | # Don't split one-line braced assignments - 'foo_t f = { 1, 2 };' 951 | # ok, true 952 | nl_assign_leave_one_liners = true # false/true 953 | 954 | # Don't split one-line braced statements inside a class xx { } body 955 | nl_class_leave_one_liners = false # false/true 956 | 957 | # Don't split one-line enums: 'enum foo { BAR = 15 };' 958 | # ok, false 959 | nl_enum_leave_one_liners = false # false/true 960 | 961 | # Don't split one-line get or set functions 962 | nl_getset_leave_one_liners = false # false/true 963 | 964 | # Don't split one-line function definitions - 'int foo() { return 0; }' 965 | # ok, false 966 | nl_func_leave_one_liners = false # false/true 967 | 968 | # Don't split one-line if/else statements - 'if(a) b++;' 969 | # ok, false 970 | nl_if_leave_one_liners = false # false/true 971 | 972 | # Don't split one-line OC messages 973 | # ok, true 974 | nl_oc_msg_leave_one_liner = true # false/true 975 | 976 | # Add or remove newlines at the start of the file 977 | # ok, ignore, affect for formating selected text 978 | nl_start_of_file = ignore # ignore/add/remove/force 979 | 980 | # The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force' 981 | nl_start_of_file_min = 0 # number 982 | 983 | # Add or remove newline at the end of the file 984 | nl_end_of_file = ignore # ignore/add/remove/force 985 | 986 | # The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force') 987 | nl_end_of_file_min = 0 # number 988 | 989 | # Add or remove newline between '=' and '{' 990 | nl_assign_brace = ignore # ignore/add/remove/force 991 | 992 | # Add or remove newline between '=' and '[' (D only) 993 | nl_assign_square = ignore # ignore/add/remove/force 994 | 995 | # Add or remove newline after '= [' (D only). Will also affect the newline before the ']' 996 | nl_after_square_assign = ignore # ignore/add/remove/force 997 | 998 | # The number of blank lines after a block of variable definitions at the top of a function body 999 | # 0 = No change (default) 1000 | # ok, 2 lines 1001 | nl_func_var_def_blk = 2 # number 1002 | 1003 | # The number of newlines before a block of typedefs 1004 | # 0 = No change (default) 1005 | nl_typedef_blk_start = 0 # number 1006 | 1007 | # The number of newlines after a block of typedefs 1008 | # 0 = No change (default) 1009 | nl_typedef_blk_end = 0 # number 1010 | 1011 | # The maximum consecutive newlines within a block of typedefs 1012 | # 0 = No change (default) 1013 | nl_typedef_blk_in = 0 # number 1014 | 1015 | # The number of newlines before a block of variable definitions not at the top of a function body 1016 | # 0 = No change (default) 1017 | # ok, 2 lines 1018 | nl_var_def_blk_start = 2 # number 1019 | 1020 | # The number of newlines after a block of variable definitions not at the top of a function body 1021 | # 0 = No change (default) 1022 | # ok, 2 lines 1023 | nl_var_def_blk_end = 2 # number 1024 | 1025 | # The maximum consecutive newlines within a block of variable definitions 1026 | # 0 = No change (default) 1027 | nl_var_def_blk_in = 0 # number 1028 | 1029 | # Add or remove newline between a function call's ')' and '{', as in: 1030 | # list_for_each(item, &list) { } 1031 | nl_fcall_brace = ignore # ignore/add/remove/force 1032 | 1033 | # Add or remove newline between 'enum' and '{' 1034 | nl_enum_brace = ignore # ignore/add/remove/force 1035 | 1036 | # Add or remove newline between 'struct and '{' 1037 | nl_struct_brace = ignore # ignore/add/remove/force 1038 | 1039 | # Add or remove newline between 'union' and '{' 1040 | nl_union_brace = ignore # ignore/add/remove/force 1041 | 1042 | # Add or remove newline between 'if' and '{' 1043 | # ok, remove 1044 | nl_if_brace = remove # ignore/add/remove/force 1045 | 1046 | # Add or remove newline between '}' and 'else' 1047 | # ok, remove 1048 | nl_brace_else = remove # ignore/add/remove/force 1049 | 1050 | # Add or remove newline between 'else if' and '{' 1051 | # If set to ignore, nl_if_brace is used instead 1052 | # ok, ignore 1053 | nl_elseif_brace = ignore # ignore/add/remove/force 1054 | 1055 | # Add or remove newline between 'else' and '{' 1056 | # ok, remove 1057 | nl_else_brace = remove # ignore/add/remove/force 1058 | 1059 | # Add or remove newline between 'else' and 'if' 1060 | # ok, remove 1061 | nl_else_if = remove # ignore/add/remove/force 1062 | 1063 | # Add or remove newline between '}' and 'finally' 1064 | # ok, remove 有問題 1065 | nl_brace_finally = remove # ignore/add/remove/force 1066 | 1067 | # Add or remove newline between 'finally' and '{' 1068 | nl_finally_brace = remove # ignore/add/remove/force 1069 | 1070 | # Add or remove newline between 'try' and '{' 1071 | # ok, remove 1072 | nl_try_brace = remove # ignore/add/remove/force 1073 | 1074 | # Add or remove newline between get/set and '{' 1075 | nl_getset_brace = ignore # ignore/add/remove/force 1076 | 1077 | # Add or remove newline between 'for' and '{' 1078 | # ok, remove 1079 | nl_for_brace = remove # ignore/add/remove/force 1080 | 1081 | # Add or remove newline between 'catch' and '{' 1082 | # ok, ignore. if remove, will make '}\n@finally' 1083 | nl_catch_brace = ignore # ignore/add/remove/force 1084 | 1085 | # Add or remove newline between '}' and 'catch' 1086 | # ok, ignore 1087 | nl_brace_catch = ignore # ignore/add/remove/force 1088 | 1089 | # Add or remove newline between 'while' and '{' 1090 | nl_while_brace = remove # ignore/add/remove/force 1091 | 1092 | # Add or remove newline between 'scope (x)' and '{' (D) 1093 | nl_scope_brace = ignore # ignore/add/remove/force 1094 | 1095 | # Add or remove newline between 'unittest' and '{' (D) 1096 | nl_unittest_brace = ignore # ignore/add/remove/force 1097 | 1098 | # Add or remove newline between 'version (x)' and '{' (D) 1099 | nl_version_brace = ignore # ignore/add/remove/force 1100 | 1101 | # Add or remove newline between 'using' and '{' 1102 | nl_using_brace = ignore # ignore/add/remove/force 1103 | 1104 | # Add or remove newline between two open or close braces. 1105 | # Due to general newline/brace handling, REMOVE may not work. 1106 | nl_brace_brace = ignore # ignore/add/remove/force 1107 | 1108 | # Add or remove newline between 'do' and '{' 1109 | nl_do_brace = remove # ignore/add/remove/force 1110 | 1111 | # Add or remove newline between '}' and 'while' of 'do' statement 1112 | nl_brace_while = remove # ignore/add/remove/force 1113 | 1114 | # Add or remove newline between 'switch' and '{' 1115 | nl_switch_brace = remove # ignore/add/remove/force 1116 | 1117 | # Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc. 1118 | # Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch, and nl_catch_brace. 1119 | nl_multi_line_cond = false # false/true 1120 | 1121 | # Force a newline in a define after the macro name for multi-line defines. 1122 | nl_multi_line_define = false # false/true 1123 | 1124 | # Whether to put a newline before 'case' statement 1125 | nl_before_case = false # false/true 1126 | 1127 | # Add or remove newline between ')' and 'throw' 1128 | nl_before_throw = ignore # ignore/add/remove/force 1129 | 1130 | # Whether to put a newline after 'case' statement 1131 | nl_after_case = false # false/true 1132 | 1133 | # Add or remove a newline between a case ':' and '{'. Overrides nl_after_case. 1134 | nl_case_colon_brace = ignore # ignore/add/remove/force 1135 | 1136 | # Newline between namespace and { 1137 | nl_namespace_brace = ignore # ignore/add/remove/force 1138 | 1139 | # Add or remove newline between 'template<>' and whatever follows. 1140 | nl_template_class = ignore # ignore/add/remove/force 1141 | 1142 | # Add or remove newline between 'class' and '{' 1143 | nl_class_brace = ignore # ignore/add/remove/force 1144 | 1145 | # Add or remove newline after each ',' in the constructor member initialization 1146 | nl_class_init_args = ignore # ignore/add/remove/force 1147 | 1148 | # Add or remove newline between return type and function name in a function definition 1149 | nl_func_type_name = ignore # ignore/add/remove/force 1150 | 1151 | # Add or remove newline between return type and function name inside a class {} 1152 | # Uses nl_func_type_name or nl_func_proto_type_name if set to ignore. 1153 | nl_func_type_name_class = ignore # ignore/add/remove/force 1154 | 1155 | # Add or remove newline between function scope and name in a definition 1156 | # Controls the newline after '::' in 'void A::f() { }' 1157 | nl_func_scope_name = ignore # ignore/add/remove/force 1158 | 1159 | # Add or remove newline between return type and function name in a prototype 1160 | nl_func_proto_type_name = ignore # ignore/add/remove/force 1161 | 1162 | # Add or remove newline between a function name and the opening '(' 1163 | nl_func_paren = ignore # ignore/add/remove/force 1164 | 1165 | # Add or remove newline between a function name and the opening '(' in the definition 1166 | nl_func_def_paren = ignore # ignore/add/remove/force 1167 | 1168 | # Add or remove newline after '(' in a function declaration 1169 | nl_func_decl_start = ignore # ignore/add/remove/force 1170 | 1171 | # Add or remove newline after '(' in a function definition 1172 | nl_func_def_start = ignore # ignore/add/remove/force 1173 | 1174 | # Overrides nl_func_decl_start when there is only one parameter. 1175 | nl_func_decl_start_single = ignore # ignore/add/remove/force 1176 | 1177 | # Overrides nl_func_def_start when there is only one parameter. 1178 | nl_func_def_start_single = ignore # ignore/add/remove/force 1179 | 1180 | # Add or remove newline after each ',' in a function declaration 1181 | nl_func_decl_args = ignore # ignore/add/remove/force 1182 | 1183 | # Add or remove newline after each ',' in a function definition 1184 | nl_func_def_args = ignore # ignore/add/remove/force 1185 | 1186 | # Add or remove newline before the ')' in a function declaration 1187 | nl_func_decl_end = ignore # ignore/add/remove/force 1188 | 1189 | # Add or remove newline before the ')' in a function definition 1190 | nl_func_def_end = ignore # ignore/add/remove/force 1191 | 1192 | # Overrides nl_func_decl_end when there is only one parameter. 1193 | nl_func_decl_end_single = ignore # ignore/add/remove/force 1194 | 1195 | # Overrides nl_func_def_end when there is only one parameter. 1196 | nl_func_def_end_single = ignore # ignore/add/remove/force 1197 | 1198 | # Add or remove newline between '()' in a function declaration. 1199 | nl_func_decl_empty = ignore # ignore/add/remove/force 1200 | 1201 | # Add or remove newline between '()' in a function definition. 1202 | nl_func_def_empty = ignore # ignore/add/remove/force 1203 | 1204 | # Whether to put each OC message parameter on a separate line 1205 | # See nl_oc_msg_leave_one_liner 1206 | # ok, false 1207 | nl_oc_msg_args = false # false/true 1208 | 1209 | # Add or remove newline between function signature and '{' 1210 | # ok, force 1211 | nl_fdef_brace = force # ignore/add/remove/force 1212 | 1213 | # Add or remove a newline between the return keyword and return expression. 1214 | nl_return_expr = ignore # ignore/add/remove/force 1215 | 1216 | # Whether to put a newline after semicolons, except in 'for' statements 1217 | nl_after_semicolon = false # false/true 1218 | 1219 | # Whether to put a newline after brace open. 1220 | # This also adds a newline before the matching brace close. 1221 | # ok, false, don't effect NSDictionaray *a = @{@"abc", @"bb"}; 1222 | nl_after_brace_open = false # false/true 1223 | 1224 | # If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is 1225 | # placed between the open brace and a trailing single-line comment. 1226 | nl_after_brace_open_cmt = true # false/true 1227 | 1228 | # Whether to put a newline after a virtual brace open with a non-empty body. 1229 | # These occur in un-braced if/while/do/for statement bodies. 1230 | nl_after_vbrace_open = false # false/true 1231 | 1232 | # Whether to put a newline after a virtual brace open with an empty body. 1233 | # These occur in un-braced if/while/do/for statement bodies. 1234 | nl_after_vbrace_open_empty = false # false/true 1235 | 1236 | # Whether to put a newline after a brace close. 1237 | # Does not apply if followed by a necessary ';'. 1238 | nl_after_brace_close = false # false/true 1239 | 1240 | # Whether to put a newline after a virtual brace close. 1241 | # Would add a newline before return in: 'if (foo) a++; return;' 1242 | nl_after_vbrace_close = false # false/true 1243 | 1244 | # Control the newline between the close brace and 'b' in: 'struct { int a; } b;' 1245 | # Affects enums, unions, and structures. If set to ignore, uses nl_after_brace_close 1246 | nl_brace_struct_var = ignore # ignore/add/remove/force 1247 | 1248 | # Whether to alter newlines in '#define' macros 1249 | nl_define_macro = false # false/true 1250 | 1251 | # Whether to not put blanks after '#ifxx', '#elxx', or before '#endif' 1252 | nl_squeeze_ifdef = false # false/true 1253 | 1254 | # Add or remove blank line before 'if' 1255 | # ok, force 1256 | nl_before_if = force # ignore/add/remove/force 1257 | 1258 | # Add or remove blank line after 'if' statement 1259 | nl_after_if = force # ignore/add/remove/force 1260 | 1261 | # Add or remove blank line before 'for' 1262 | nl_before_for = force # ignore/add/remove/force 1263 | 1264 | # Add or remove blank line after 'for' statement 1265 | nl_after_for = force # ignore/add/remove/force 1266 | 1267 | # Add or remove blank line before 'while' 1268 | nl_before_while = force # ignore/add/remove/force 1269 | 1270 | # Add or remove blank line after 'while' statement 1271 | nl_after_while = force # ignore/add/remove/force 1272 | 1273 | # Add or remove blank line before 'switch' 1274 | nl_before_switch = force # ignore/add/remove/force 1275 | 1276 | # Add or remove blank line after 'switch' statement 1277 | nl_after_switch = force # ignore/add/remove/force 1278 | 1279 | # Add or remove blank line before 'do' 1280 | nl_before_do = force # ignore/add/remove/force 1281 | 1282 | # Add or remove blank line after 'do/while' statement 1283 | nl_after_do = force # ignore/add/remove/force 1284 | 1285 | # Whether to double-space commented-entries in struct/enum 1286 | nl_ds_struct_enum_cmt = false # false/true 1287 | 1288 | # Whether to double-space before the close brace of a struct/union/enum 1289 | # (lower priority than 'eat_blanks_before_close_brace') 1290 | nl_ds_struct_enum_close_brace = false # false/true 1291 | 1292 | # Add or remove a newline around a class colon. 1293 | # Related to pos_class_colon, nl_class_init_args, and pos_comma. 1294 | nl_class_colon = ignore # ignore/add/remove/force 1295 | 1296 | # Change simple unbraced if statements into a one-liner 1297 | # 'if(b)\n i++;' => 'if(b) i++;' 1298 | nl_create_if_one_liner = false # false/true 1299 | 1300 | # Change simple unbraced for statements into a one-liner 1301 | # 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);' 1302 | nl_create_for_one_liner = false # false/true 1303 | 1304 | # Change simple unbraced while statements into a one-liner 1305 | # 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);' 1306 | nl_create_while_one_liner = false # false/true 1307 | 1308 | # 1309 | # Positioning options 1310 | # 1311 | 1312 | # The position of arithmetic operators in wrapped expressions 1313 | pos_arith = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1314 | 1315 | # The position of assignment in wrapped expressions. 1316 | # Do not affect '=' followed by '{' 1317 | pos_assign = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1318 | 1319 | # The position of boolean operators in wrapped expressions 1320 | pos_bool = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1321 | 1322 | # The position of comparison operators in wrapped expressions 1323 | pos_compare = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1324 | 1325 | # The position of conditional (b ? t : f) operators in wrapped expressions 1326 | pos_conditional = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1327 | 1328 | # The position of the comma in wrapped expressions 1329 | pos_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1330 | 1331 | # The position of the comma in the constructor initialization list 1332 | pos_class_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1333 | 1334 | # The position of colons between constructor and member initialization 1335 | pos_class_colon = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1336 | 1337 | # 1338 | # Line Splitting options 1339 | # 1340 | 1341 | # Try to limit code width to N number of columns 1342 | code_width = 0 # number 1343 | 1344 | # Whether to fully split long 'for' statements at semi-colons 1345 | ls_for_split_full = false # false/true 1346 | 1347 | # Whether to fully split long function protos/calls at commas 1348 | ls_func_split_full = false # false/true 1349 | 1350 | # Whether to split lines as close to code_width as possible and ignore some groupings 1351 | ls_code_width = false # false/true 1352 | 1353 | # 1354 | # Blank line options 1355 | # 1356 | 1357 | # The maximum consecutive newlines 1358 | # ok, 2 1359 | nl_max = 2 # number 1360 | 1361 | # The number of newlines after a function prototype, if followed by another function prototype 1362 | nl_after_func_proto = 0 # number 1363 | 1364 | # The number of newlines after a function prototype, if not followed by another function prototype 1365 | nl_after_func_proto_group = 0 # number 1366 | 1367 | # The number of newlines after '}' of a multi-line function body 1368 | # ok, 2 newlines 1369 | nl_after_func_body = 2 # number 1370 | 1371 | # The number of newlines after '}' of a multi-line function body in a class declaration 1372 | nl_after_func_body_class = 0 # number 1373 | 1374 | # The number of newlines after '}' of a single line function body 1375 | nl_after_func_body_one_liner = 0 # number 1376 | 1377 | # The minimum number of newlines before a multi-line comment. 1378 | # Doesn't apply if after a brace open or another multi-line comment. 1379 | nl_before_block_comment = 0 # number 1380 | 1381 | # The minimum number of newlines before a single-line C comment. 1382 | # Doesn't apply if after a brace open or other single-line C comments. 1383 | nl_before_c_comment = 0 # number 1384 | 1385 | # The minimum number of newlines before a CPP comment. 1386 | # Doesn't apply if after a brace open or other CPP comments. 1387 | nl_before_cpp_comment = 0 # number 1388 | 1389 | # Whether to force a newline after a multi-line comment. 1390 | nl_after_multiline_comment = false # false/true 1391 | 1392 | # The number of newlines after '}' or ';' of a struct/enum/union definition 1393 | nl_after_struct = 0 # number 1394 | 1395 | # The number of newlines after '}' or ';' of a class definition 1396 | nl_after_class = 0 # number 1397 | 1398 | # The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. 1399 | # Will not change the newline count if after a brace open. 1400 | # 0 = No change. 1401 | nl_before_access_spec = 0 # number 1402 | 1403 | # The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. 1404 | # 0 = No change. 1405 | nl_after_access_spec = 0 # number 1406 | 1407 | # The number of newlines between a function def and the function comment. 1408 | # 0 = No change. 1409 | nl_comment_func_def = 0 # number 1410 | 1411 | # The number of newlines after a try-catch-finally block that isn't followed by a brace close. 1412 | # 0 = No change. 1413 | nl_after_try_catch_finally = 0 # number 1414 | 1415 | # The number of newlines before and after a property, indexer or event decl. 1416 | # 0 = No change. 1417 | nl_around_cs_property = 0 # number 1418 | 1419 | # The number of newlines between the get/set/add/remove handlers in C#. 1420 | # 0 = No change. 1421 | nl_between_get_set = 0 # number 1422 | 1423 | # Add or remove newline between C# property and the '{' 1424 | nl_property_brace = ignore # ignore/add/remove/force 1425 | 1426 | # Whether to remove blank lines after '{' 1427 | # ok, false 1428 | eat_blanks_after_open_brace = false # false/true 1429 | 1430 | # Whether to remove blank lines before '}' 1431 | # ok, false 1432 | eat_blanks_before_close_brace = false # false/true 1433 | 1434 | # How aggressively to remove extra newlines not in preproc. 1435 | # 0: No change 1436 | # 1: Remove most newlines not handled by other config 1437 | # 2: Remove all newlines and reformat completely by config 1438 | nl_remove_extra_newlines = 0 # number 1439 | 1440 | # Whether to put a blank line before 'return' statements, unless after an open brace. 1441 | nl_before_return = true # false/true 1442 | 1443 | # Whether to put a blank line after 'return' statements, unless followed by a close brace. 1444 | nl_after_return = false # false/true 1445 | 1446 | # Whether to put a newline after a Java annotation statement. 1447 | # Only affects annotations that are after a newline. 1448 | nl_after_annotation = ignore # ignore/add/remove/force 1449 | 1450 | # Controls the newline between two annotations. 1451 | nl_between_annotation = ignore # ignore/add/remove/force 1452 | 1453 | # 1454 | # Code modifying options (non-whitespace) 1455 | # 1456 | 1457 | # Add or remove braces on single-line 'do' statement 1458 | mod_full_brace_do = ignore # ignore/add/remove/force 1459 | 1460 | # Add or remove braces on single-line 'for' statement 1461 | mod_full_brace_for = ignore # ignore/add/remove/force 1462 | 1463 | # Add or remove braces on single-line function definitions. (Pawn) 1464 | mod_full_brace_function = ignore # ignore/add/remove/force 1465 | 1466 | # Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'. 1467 | mod_full_brace_if = ignore # ignore/add/remove/force 1468 | 1469 | # Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if. 1470 | # If any must be braced, they are all braced. If all can be unbraced, then the braces are removed. 1471 | mod_full_brace_if_chain = false # false/true 1472 | 1473 | # Don't remove braces around statements that span N newlines 1474 | mod_full_brace_nl = 0 # number 1475 | 1476 | # Add or remove braces on single-line 'while' statement 1477 | mod_full_brace_while = ignore # ignore/add/remove/force 1478 | 1479 | # Add or remove braces on single-line 'using ()' statement 1480 | mod_full_brace_using = ignore # ignore/add/remove/force 1481 | 1482 | # Add or remove unnecessary paren on 'return' statement 1483 | mod_paren_on_return = ignore # ignore/add/remove/force 1484 | 1485 | # Whether to change optional semicolons to real semicolons 1486 | mod_pawn_semicolon = false # false/true 1487 | 1488 | # Add parens on 'while' and 'if' statement around bools 1489 | mod_full_paren_if_bool = false # false/true 1490 | 1491 | # Whether to remove superfluous semicolons 1492 | mod_remove_extra_semicolon = false # false/true 1493 | 1494 | # If a function body exceeds the specified number of newlines and doesn't have a comment after 1495 | # the close brace, a comment will be added. 1496 | mod_add_long_function_closebrace_comment = 0 # number 1497 | 1498 | # If a switch body exceeds the specified number of newlines and doesn't have a comment after 1499 | # the close brace, a comment will be added. 1500 | mod_add_long_switch_closebrace_comment = 0 # number 1501 | 1502 | # If an #ifdef body exceeds the specified number of newlines and doesn't have a comment after 1503 | # the #endif, a comment will be added. 1504 | mod_add_long_ifdef_endif_comment = 0 # number 1505 | 1506 | # If an #ifdef or #else body exceeds the specified number of newlines and doesn't have a comment after 1507 | # the #else, a comment will be added. 1508 | mod_add_long_ifdef_else_comment = 0 # number 1509 | 1510 | # If TRUE, will sort consecutive single-line 'import' statements [Java, D] 1511 | mod_sort_import = false # false/true 1512 | 1513 | # If TRUE, will sort consecutive single-line 'using' statements [C#] 1514 | mod_sort_using = false # false/true 1515 | 1516 | # If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C] 1517 | # This is generally a bad idea, as it may break your code. 1518 | mod_sort_include = false # false/true 1519 | 1520 | # If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace. 1521 | mod_move_case_break = false # false/true 1522 | 1523 | # Will add or remove the braces around a fully braced case statement. 1524 | # Will only remove the braces if there are no variable declarations in the block. 1525 | mod_case_brace = ignore # ignore/add/remove/force 1526 | 1527 | # If TRUE, it will remove a void 'return;' that appears as the last statement in a function. 1528 | mod_remove_empty_return = false # false/true 1529 | 1530 | # 1531 | # Comment modifications 1532 | # 1533 | 1534 | # Try to wrap comments at cmt_width columns 1535 | cmt_width = 0 # number 1536 | 1537 | # Set the comment reflow mode (default: 0) 1538 | # 0: no reflowing (apart from the line wrapping due to cmt_width) 1539 | # 1: no touching at all 1540 | # 2: full reflow 1541 | cmt_reflow_mode = 0 # number 1542 | 1543 | # If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars. 1544 | # Default is true. 1545 | cmt_indent_multi = true # false/true 1546 | 1547 | # Whether to group c-comments that look like they are in a block 1548 | cmt_c_group = false # false/true 1549 | 1550 | # Whether to put an empty '/*' on the first line of the combined c-comment 1551 | cmt_c_nl_start = false # false/true 1552 | 1553 | # Whether to put a newline before the closing '*/' of the combined c-comment 1554 | cmt_c_nl_end = false # false/true 1555 | 1556 | # Whether to group cpp-comments that look like they are in a block 1557 | cmt_cpp_group = false # false/true 1558 | 1559 | # Whether to put an empty '/*' on the first line of the combined cpp-comment 1560 | cmt_cpp_nl_start = false # false/true 1561 | 1562 | # Whether to put a newline before the closing '*/' of the combined cpp-comment 1563 | cmt_cpp_nl_end = false # false/true 1564 | 1565 | # Whether to change cpp-comments into c-comments 1566 | cmt_cpp_to_c = false # false/true 1567 | 1568 | # Whether to put a star on subsequent comment lines 1569 | cmt_star_cont = false # false/true 1570 | 1571 | # The number of spaces to insert at the start of subsequent comment lines 1572 | cmt_sp_before_star_cont = 0 # number 1573 | 1574 | # The number of spaces to insert after the star on subsequent comment lines 1575 | cmt_sp_after_star_cont = 0 # number 1576 | 1577 | # For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of 1578 | # the comment are the same length. Default=True 1579 | cmt_multi_check_last = true # false/true 1580 | 1581 | # The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment. 1582 | # Will substitute $(filename) with the current file's name. 1583 | cmt_insert_file_header = "" # string 1584 | 1585 | # The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment. 1586 | # Will substitute $(filename) with the current file's name. 1587 | cmt_insert_file_footer = "" # string 1588 | 1589 | # The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment. 1590 | # Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff. 1591 | # Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... } 1592 | cmt_insert_func_header = "" # string 1593 | 1594 | # The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment. 1595 | # Will substitute $(class) with the class name. 1596 | cmt_insert_class_header = "" # string 1597 | 1598 | # The filename that contains text to insert before a Obj-C message specification if the method isn't preceeded with a C/C++ comment. 1599 | # Will substitute $(message) with the function name and $(javaparam) with the javadoc @param and @return stuff. 1600 | cmt_insert_oc_msg_header = "" # string 1601 | 1602 | # If a preprocessor is encountered when stepping backwards from a function name, then 1603 | # this option decides whether the comment should be inserted. 1604 | # Affects cmt_insert_oc_msg_header, cmt_insert_func_header and cmt_insert_class_header. 1605 | cmt_insert_before_preproc = false # false/true 1606 | 1607 | # 1608 | # Preprocessor options 1609 | # 1610 | 1611 | # Control indent of preprocessors inside #if blocks at brace level 0 1612 | pp_indent = ignore # ignore/add/remove/force 1613 | 1614 | # Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false) 1615 | pp_indent_at_level = false # false/true 1616 | 1617 | # If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1. 1618 | pp_indent_count = 1 # number 1619 | 1620 | # Add or remove space after # based on pp_level of #if blocks 1621 | pp_space = ignore # ignore/add/remove/force 1622 | 1623 | # Sets the number of spaces added with pp_space 1624 | pp_space_count = 0 # number 1625 | 1626 | # The indent for #region and #endregion in C# and '#pragma region' in C/C++ 1627 | pp_indent_region = 0 # number 1628 | 1629 | # Whether to indent the code between #region and #endregion 1630 | pp_region_indent_code = false # false/true 1631 | 1632 | # If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level 1633 | pp_indent_if = 0 # number 1634 | 1635 | # Control whether to indent the code between #if, #else and #endif when not at file-level 1636 | pp_if_indent_code = false # false/true 1637 | 1638 | # Whether to indent '#define' at the brace level (true) or from column 1 (false) 1639 | pp_define_at_level = false # false/true 1640 | 1641 | # You can force a token to be a type with the 'type' option. 1642 | # Example: 1643 | # type myfoo1 myfoo2 1644 | # 1645 | # You can create custom macro-based indentation using macro-open, 1646 | # macro-else and macro-close. 1647 | # Example: 1648 | # macro-open BEGIN_TEMPLATE_MESSAGE_MAP 1649 | # macro-open BEGIN_MESSAGE_MAP 1650 | # macro-close END_MESSAGE_MAP 1651 | # 1652 | # You can assign any keyword to any type with the set option. 1653 | # set func_call_user _ N_ 1654 | # 1655 | # The full syntax description of all custom definition config entries 1656 | # is shown below: 1657 | # 1658 | # define custom tokens as: 1659 | # - embed whitespace in token using '' escape character, or 1660 | # put token in quotes 1661 | # - these: ' " and ` are recognized as quote delimiters 1662 | # 1663 | # type token1 token2 token3 ... 1664 | # ^ optionally specify multiple tokens on a single line 1665 | # define def_token output_token 1666 | # ^ output_token is optional, then NULL is assumed 1667 | # macro-open token 1668 | # macro-close token 1669 | # macro-else token 1670 | # set id token1 token2 ... 1671 | # ^ optionally specify multiple tokens on a single line 1672 | # ^ id is one of the names in token_enum.h sans the CT_ prefix, 1673 | # e.g. PP_PRAGMA 1674 | # 1675 | # all tokens are separated by any mix of ',' commas, '=' equal signs 1676 | # and whitespace (space, tab) 1677 | # 1678 | --------------------------------------------------------------------------------