<!--
{
  "availability" : [
    "macOS: 10.12.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XcodeKit",
  "identifier" : "/documentation/XcodeKit/XCSourceTextBuffer/usesTabsForIndentation",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "XcodeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)XCSourceTextBuffer(py)usesTabsForIndentation"
  },
  "title" : "usesTabsForIndentation"
}
-->

# usesTabsForIndentation

A Boolean value that indicates whether tabs are used for indentation.

```
var usesTabsForIndentation: Bool { get }
```

## Discussion

The `usesTabsForIndentation` property determines whether tab characters are used to indent text instead of space characters when possible. When the indentation width isn’t a multiple of the tab width, space characters are used to pad the indentation to the appropriate width.

For example, consider an `XCSourceTextBuffer` instance that has a tab width of eight, an indentation width of four, and the `usesTabsForIndentation` property set to `true`. The first indentation level is represented by four space characters, the second by a tab character, the third by a tab followed by four space characters, the fourth by two tab characters, and so on.

![A diagram showing four lines of source code, with each line indented once more than the last.](images/com.apple.xcodekit/media-2902679@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)