When comparing text, Kaleidoscope can highlight different syntax elements in structured languages. Syntax Highlighting not only enhances readability but also helps users quickly identify differences in content, making comparisons more intuitive.
Kaleidoscope supports many structured languages, from text markup languages like Markdown or HTML, settings syntaxes like PLIST or YAML, scripting languages like Shell or JavaScript, and a multitude of programming languages like Python or Swift.
Syntax Highlighting typically just works seamlessly with little need to interact, but here are a few tidbits to be aware of.
How to Control Syntax Highlighting
If you prefer to not have highlighting, you can turn it off both on a global level, in Settings > Text > Highlight Syntax using Theme, and per document, by selecting View > Syntax Coloring > None from the menu.
Override Language
Kaleidoscope uses the UTI (Uniform Type Identifier) of a file to determine which language syntax to use for highlighting. If that UTI is incorrect, or you are using a language not supported by Kaleidoscope but similar to an existing one, you can override the recognized language at any time, again by selecting View > Syntax Coloring and then choosing from the list. The same menu can be found from the left-most button in the bottom toolbar.
Note: Not a very common use case for Kaleidoscope, but if you are comparing files using two different languages/UTIs, Kaleidoscope will try to find common ground between those two. You may need to adjust in those cases.
If you happen to work with a structured language that Kaleidoscope does not yet support, please get in touch. Maybe we can add it in a future release.
Theming
By default, Kaleidoscope uses syntax colors inspired by the Default Theme in Xcode, but there are many other themes available to cater to your taste. Find them in Settings > Text > Theme. Note that all themes offered in Kaleidoscope work both in Light and Dark appearance.
Let us know if we are missing your favorite theme (ideally by providing us with information for that theme in light and dark variants).
Large Files
When Kaleidoscope reads very large files, it automatically turns off Syntax Highlighting, assuming you’d rather see single-color text sooner than wait for a few seconds more to see colored text. However, by explicitly choosing the language of your choice (usually annotated with Default for Type in the menu), you can override this behavior and have your text highlighted for that document, accepting the additional wait.
Summary
Syntax Highlighting should be pretty automatic and self-explanatory in Kaleidoscope. Choose your preferred theme and keep comparing. If you run into issues like a missing language, just get in touch with us!