CotEditor
Plain-text editor for web pages, program source codes and more
Quick Take: CotEditor
CotEditor is the best lightweight text editor for macOS. It opens faster than anything else, looks and feels like a native Mac app, and provides the features that matter for text editing: syntax highlighting, regex search, split editing, and an outline navigator. It doesn't try to be an IDE and it's better for that focus. For developers who use VS Code or Vim as their primary editor, CotEditor is the perfect complementary tool for quick file edits and text work. For writers, sysadmins, and anyone who works with plain text daily, CotEditor is a quiet essential.
Best For
- •Quick File Edits (Config Files, Logs, CSV, Scripts)
- •Markdown Writing with Minimal Distraction
- •macOS Users Who Want a Native, Lightweight Text Editor
What is CotEditor?
CotEditor is a free, open-source plain-text editor built specifically for macOS. It's a Cocoa-native app—written in Swift, using AppKit, and designed to feel like it belongs on a Mac. Launch it, and you have an editor in half a second. No Electron, no web views, no framework overhead. CotEditor targets a specific niche: people who need a text editor that's better than TextEdit but lighter than VS Code. You edit config files, write Markdown, view logs, modify CSVs, write scripts, and work with plain text in dozens of formats. CotEditor handles all of this with syntax highlighting for 50+ languages, a regex-powered find-and-replace, split editor views, custom themes, and an outline menu that parses document structure. What makes CotEditor worth trying over other editors isn't any single feature—it's the overall experience. The app is fast. Files open instantly regardless of size. Syntax highlighting activates immediately. Window management follows macOS conventions perfectly—tabs, split views, and full-screen mode work exactly as you'd expect from a native app. The preferences window is a standard macOS preferences pane. The print dialog produces well-formatted output. It integrates with macOS Services, Shortcuts, and AppleScript. CotEditor was created by Nakamuxu in 2004 and is now maintained by Yoshimasa Niwa and a community of contributors on GitHub. It's been continuously developed for over 20 years, which is remarkable for a free, volunteer-maintained project. The app ships on the Mac App Store (free) and through Homebrew. CotEditor isn't trying to replace VS Code or Vim. It doesn't have an extension marketplace, an integrated terminal, or IntelliSense. What it does is open instantly, handle text elegantly, and get out of your way. For quick edits, config files, and everyday text work, that's exactly what you want.
Install with Homebrew
brew install --cask coteditorDeep Dive: Why Native macOS Apps Still Matter
In a world of Electron apps and web-based editors, CotEditor represents the case for native development.
History & Background
CotEditor was first created in 2004 by Nakamuxu, making it one of the oldest continuously maintained macOS text editors. It was originally written in Objective-C and has been progressively rewritten in Swift as the language matured. The name 'CotEditor' comes from 'cot' (a small bed) — implying a lightweight, cozy editor. The project survived the transitions from PowerPC to Intel, Intel to Apple Silicon, and multiple macOS API changes—testament to the stability benefits of building on Apple's native frameworks.
How It Works
CotEditor is built entirely on AppKit (macOS's native UI framework) and NSTextView (Apple's text editing system). This means it automatically benefits from macOS text rendering improvements, accessibility features, system text substitutions, and input method support. The syntax highlighting engine uses NSTextStorage for efficient incremental highlighting—only changed regions are re-highlighted, not the entire document. File encoding detection uses ICU (International Components for Unicode) for accurate character set identification.
Ecosystem & Integrations
CotEditor sits in a unique position: it's the best free native text editor for macOS, but it doesn't compete directly with VS Code, Vim, or Sublime Text because it doesn't try to be an IDE. Its real competition is TextEdit (too basic), BBEdit ($49.99, more powerful but not free), and TextMate (open-source but no longer actively developed). For macOS users who want a quick, native editor for non-IDE tasks, CotEditor has no equal.
Future Development
CotEditor's development continues with regular macOS compatibility updates, new syntax definitions, performance improvements, and UI refinements. The project doesn't chase feature parity with full editors—instead, it refines the experience of quick, native text editing. Recent additions include improved regex performance, dark mode refinements, and expanded Unicode support.
Key Features
Syntax Highlighting
CotEditor provides syntax highlighting for 50+ languages and file formats including Swift, Python, JavaScript, TypeScript, HTML, CSS, JSON, YAML, TOML, Markdown, Ruby, PHP, SQL, Shell scripts, LaTeX, and many more. Highlighting definitions are customizable—you can create new ones for proprietary or niche file formats using CotEditor's syntax definition editor. Themes control the colors, and CotEditor ships with several built-in themes including light and dark options.
Find & Replace with Regular Expressions
The find panel supports plain text search, regular expression search, and replacement with capture group references. Search across the entire document or within a selection. Find All highlights every match and shows results in a list. Replace All handles bulk changes. The regex engine supports lookahead, lookbehind, Unicode properties, and multiline matching. For editing config files, CSV data, or log files where pattern-based search is essential, this is a critical feature.
Split Editor
Split the editor vertically or horizontally to view different parts of the same document simultaneously. Edit the header while viewing the footer. Compare two sections of a long config file. Reference one part of a script while editing another. Both panes scroll independently but share the same document—changes in one pane appear instantly in the other.
Outline Menu
CotEditor parses document structure and shows an outline in the navigation bar. For Markdown files, the outline shows headings. For code files, it shows functions, classes, and sections. For HTML, it shows heading tags. Click an outline item to jump directly to that location. This is especially useful for long files where scrolling and searching are too slow.
Character Inspector
Click on any character in the document, and CotEditor shows its Unicode code point, name, block, and general category. This is invaluable for debugging encoding issues—non-breaking spaces that look like regular spaces, smart quotes that break scripts, invisible Unicode characters that cause parsing errors. The character inspector identifies exactly what character is at the cursor position.
Command-Line Tool (cot)
CotEditor includes a command-line tool (`cot`) that opens files from the terminal. Run `cot filename.txt` and it opens in CotEditor. Use `cot --wait filename.txt` to block the terminal until the file is closed—useful as a Git commit message editor (`git config --global core.editor 'cot --wait'`). Pipe output into CotEditor with `echo 'text' | cot`. The CLI tool bridges CotEditor's GUI with terminal-based workflows.
Who Should Use CotEditor?
1System Administrator
A sysadmin edits configuration files daily—nginx configs, SSH settings, crontabs, shell scripts. CotEditor opens these files instantly, applies syntax highlighting, and provides regex-powered search. The split editor shows the main config and included files simultaneously. The character inspector catches encoding issues in configs that were edited on different operating systems.
2Writer Using Markdown
A technical writer drafts documentation in Markdown. CotEditor highlights Markdown syntax (headers, links, code blocks, emphasis), and the outline menu shows the document structure by heading level. Writing in CotEditor is distraction-free—no sidebar, no extensions panel, no notification badges. The app opens instantly for quick notes and stays responsive during long writing sessions.
3Developer Making Quick Edits
A developer uses VS Code as their primary editor but keeps CotEditor for quick file edits. When they need to modify a single config file, view a log, or edit a CSV, CotEditor opens in 300ms while VS Code takes 3-5 seconds. The `cot` command-line tool integrates with their terminal workflow. CotEditor handles the 'open, edit, save, close' cycle faster than any Electron-based editor.
How to Install CotEditor on Mac
CotEditor is available via Homebrew, the Mac App Store, and direct download.
Install via Homebrew
Run `brew install --cask coteditor`. The app installs to your Applications folder.
Install the Command-Line Tool
Open CotEditor > Settings > General and click 'Install Command-Line Tool.' This installs the `cot` command to /usr/local/bin, making it available in your terminal.
Set as Git Editor (Optional)
If you want to use CotEditor for git commit messages, run: `git config --global core.editor 'cot --wait'`. The `--wait` flag keeps the terminal blocked until you save and close the file in CotEditor.
Choose a Theme
Settings > Appearance lets you choose from built-in themes or import custom ones. If you prefer dark mode, CotEditor respects the macOS dark mode setting automatically.
Pro Tips
- • Set CotEditor as the default app for .txt, .md, .json, and .yaml files — right-click a file > Get Info > Open With > Change All.
- • Import Xcode themes or create custom color schemes in Settings > Appearance > Themes.
- • Enable line numbers, invisibles (whitespace characters), and page guide in Settings > Edit.
Configuration Tips
Create Custom Syntax Definitions
For proprietary file formats or custom DSLs, create a syntax definition: Settings > Format > Installed Syntax Styles > New. Define keywords, comments, strings, and pattern rules. CotEditor's syntax definition format is well-documented and uses regex patterns.
Set Up Encoding Detection
Settings > Format > Default Line Ending and Encoding. Set UTF-8 as default. Enable 'Refer to encoding declaration' to automatically detect encoding declarations in files (like `# -*- coding: utf-8 -*-` in Python). This prevents mojibake when opening files from different systems.
Alternatives to CotEditor
Text editors on macOS cover a wide spectrum from minimal to full IDE.
Visual Studio Code
VS Code is a full-featured code editor with IntelliSense, integrated terminal, Git integration, debugging, and a massive extension marketplace. It's slower to launch (Electron-based) and heavier on resources. CotEditor is better for quick edits; VS Code is better as a primary development environment.
Sublime Text
Sublime Text ($99 license) is a fast, extensible text editor with a plugin ecosystem. It's faster than VS Code but slower than CotEditor. Sublime sits between CotEditor's minimalism and VS Code's full IDE—it's a good choice if you want speed with extensibility.
BBEdit
BBEdit is a veteran macOS text editor (since 1992) with powerful text processing, grep search, and file comparison tools. It costs $49.99 and offers more features than CotEditor (notably text factories for batch processing). BBEdit targets professional writers and developers who need advanced text manipulation beyond what CotEditor provides.
Pricing
CotEditor is free on the Mac App Store and via Homebrew. It's open-source under the Apache License 2.0. No premium tier, no subscription, no ads. Development is volunteer-driven and funded by community donations.
Pros
- ✓Opens in under half a second — the fastest editor on macOS
- ✓Native macOS app built with Swift and AppKit — not Electron
- ✓Syntax highlighting for 50+ languages with customizable definitions
- ✓Regex-powered find and replace with capture group support
- ✓Character Inspector identifies Unicode encoding issues instantly
- ✓Completely free and open-source with 20+ years of active development
- ✓Command-line tool integrates with terminal workflows
Cons
- ✗No extension ecosystem — what's built in is what you get
- ✗No integrated terminal, debugger, or Git integration
- ✗No code intelligence (autocomplete, type checking, IntelliSense)
- ✗macOS only — no cross-platform version
- ✗Limited collaboration features (no real-time editing, no comments)
- ✗Not suitable as a primary IDE for large codebases
Community & Support
CotEditor is maintained on GitHub (coteditor/CotEditor) with an active issue tracker and release history. The project has 6,000+ GitHub stars and a steady stream of contributions. The primary maintainer, Yoshimasa Niwa, is responsive to issues and actively develops the app. The Mac App Store page has consistently high ratings. The CotEditor website includes documentation, change logs, and links to community resources. For a free, volunteer-maintained project, the quality and consistency of development is exceptional.
Frequently Asked Questions about CotEditor
Our Verdict
CotEditor is the best lightweight text editor for macOS. It opens faster than anything else, looks and feels like a native Mac app, and provides the features that matter for text editing: syntax highlighting, regex search, split editing, and an outline navigator. It doesn't try to be an IDE and it's better for that focus. For developers who use VS Code or Vim as their primary editor, CotEditor is the perfect complementary tool for quick file edits and text work. For writers, sysadmins, and anyone who works with plain text daily, CotEditor is a quiet essential.
About the Author
Related Technologies & Concepts
Related Topics
Sources & References
Fact-CheckedLast verified: Feb 23, 2026
- 1CotEditor
Accessed Feb 23, 2026
Research queries: CotEditor Mac text editor 2026