Oh My Code
Oh My Code (OMC) is a native macOS code editor written in Swift. It only lays out what’s on screen, so typing in one place costs the same in a 20 MB file as in a small one.
Performance
Section titled “Performance”| What | Time |
|---|---|
| Typing, any file size | under 1 ms per keystroke |
| First screen after opening | about 10 ms |
| Opening a 20 MB file | about 85 ms |
| Memory for a 5 MB file | about 15 MB, instead of 270 MB |
How it stays fast:
- Only the visible text is laid out. Line positions after an edit are shifted lazily.
- Big files are parsed a window at a time. A syntax tree takes about 50 times the text’s size in memory, so files over about 1 MB are parsed for what’s on screen plus 128 KB either side. Scrolling parses a new window in the background.
- Tabs keep their editors. Each editor group keeps the editors of its 8 most recently shown tabs, so switching back is instant.
- Regressions fail the build.
PerformanceGuardTestsrun with the normal tests and fail if typing in a big file gets slow again.
Features
Section titled “Features”- Integrated terminal, powered by libghostty-vt.
- Syntax highlighting with Tree-sitter; outline and folding from the language server.
- Hot exit: open files and unsaved changes are kept between launches.
- Built-in updates from GitHub releases via Sparkle. Updates are signed and installed only when you ask.
Build from source
Section titled “Build from source”Requires macOS 15+, Xcode 27+, and XcodeGen.
-
Install XcodeGen and generate the project:
Terminal window brew install xcodegenxcodegen -
Open it in Xcode, or build and test from the command line:
Terminal window xcodebuild -scheme OhMyCode -destination 'platform=macOS' buildxcodebuild -scheme OhMyCode -destination 'platform=macOS' test
Benchmarks
Section titled “Benchmarks”The full benchmarks time opening, typing, scrolling, and memory for 1, 5, and 20 MB files:
TEST_RUNNER_OMC_BENCH=1 xcodebuild -scheme OhMyCode test \ -only-testing:OhMyCodeTests/PerformanceBenchmarksThat’s a debug build, which is several times slower in places. For release numbers, add -configuration Release ENABLE_TESTABILITY=YES ENABLE_HARDENED_RUNTIME=NO.