How to Show/hide whitespace characters in Xcode
Table of Contents
By default, Xcode won't show whitespace characters, e.g., tabs and spaces in the editor.
How to show whitespace characters visible in the Xcode editor
To show the tabs and spaces in Xcode.
- Select "Editor" menu.
- Then check "Invisibles".
After enabling the "Invisibles" menu item, you will see all whitespace characters, e.g., spaces, tabs, and newlines.
You can easily support sarunw.com by checking out this sponsor.
Debug 10x faster with Proxyman: Your ultimate tool to capture HTTPs requests/ responses, natively built for your iPhone and macOS. Special deal for Black Friday: Get 30% off for all Proxyman licenses with code “BLACKFRIDAY2024”.
How to hide whitespace characters visible in the Xcode editor
If you want to hide all whitespace characters, just repeat the above steps.
To hide the tabs and spaces in Xcode.
- Select "Editor" menu.
- Then uncheck "Invisibles".
You can easily support sarunw.com by checking out this sponsor.
Debug 10x faster with Proxyman: Your ultimate tool to capture HTTPs requests/ responses, natively built for your iPhone and macOS. Special deal for Black Friday: Get 30% off for all Proxyman licenses with code “BLACKFRIDAY2024”.
What is the benefit of visible whitespace
Some file types like Comma separated values (CSV) have very strict file format. Different whitespace characters mean different things in CSV. Turning on whitespace characters might help you catch an error in your file.
Another popular file type with a strict rule is YAML. Tabs are forbidden in the YAML file. If you get an error for no reason, it might cause by whitespace characters.
Read more article about Xcode or see all available topic
Enjoy the read?
If you enjoy this article, you can subscribe to the weekly newsletter.
Every Friday, you'll get a quick recap of all articles and tips posted on this site. No strings attached. Unsubscribe anytime.
Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.
If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.
Become a patron Buy me a coffee Tweet ShareSwiftUI List: Basic usage
SwiftUI made it incredibly easy to create a list or table view compared to how we do it in UIKit. Let's learn how to use it.
SwiftUI zIndex: Everything you need to know
zIndex is a modifier that controls the display order of overlapping views in SwiftUI. Let's learn how it works.