Website review
This review may include AI-generated content and is not individually verified. Domain, certificate and other facts come from the observed data on this page.
What is CotEditor?
CotEditor is a free, open-source plain-text editor built specifically for macOS. Its pitch is a light, fast editor that behaves like a native Mac application: quick to launch, quick to open a document, and configured through a standard settings window rather than hand-edited config files. It is aimed at people who work with text and code but don't need a full IDE—writers editing Markdown, developers doing quick edits, and anyone who regularly deals with encoding or character issues.
What it's good at
- Syntax highlighting for more than 60 pre-installed languages, including HTML, PHP, Python, Ruby and Markdown, with custom syntax definitions if yours isn't covered.
- Find and replace using the ICU regular expression engine, so pattern-based edits are practical rather than an afterthought.
- Outline menu that extracts defined lines from a document so you can jump around long files.
- Split editor for viewing different parts of the same document side by side.
- Auto backup of unsaved work while you edit.
- Character inspector showing Unicode data for selected characters.
- Incompatible character checking, which lists characters that can't be converted to a target encoding.
- CJK-friendly handling: accurate encoding estimation, vertical text mode, and correct line height in that mode.
- Scripting in Python, Ruby, Perl, PHP, UNIX shell, AppleScript or JavaScript for custom macros.
Where it fits
CotEditor suits a plain-text workflow rather than a project-centric one. If you want a fast window for editing a config file, a script, a Markdown draft or a document in an unusual encoding, the native feel and quick launch matter more than plugin ecosystems. If you need deep project navigation, integrated debugging or heavy extension support, a full IDE will serve you better.
One trade-off worth noting: the feature list is deliberately compact. The value is in doing text editing well on macOS, not in matching every capability of larger editors.
A practical next step
Install it, then open a file you already work with—a Markdown note or a source file—and check three things: whether your language is highlighted correctly, whether the encoding is detected properly, and whether the find-and-replace regex handles a pattern you actually use. If those pass, set up a syntax definition or a small script macro for your most repetitive edit. The project is developed openly and takes bug reports and feature requests through its issue tracker, so unusual encoding or CJK problems are worth reporting rather than working around.
How does CotEditor compare to other text editors for macOS?
CotEditor is best understood as a focused plain-text editor built specifically for macOS, not a general-purpose code IDE. Its appeal is speed and simplicity: it launches quickly, follows native macOS conventions, and puts settings in a normal preferences window rather than config files. For someone who edits Markdown, shell scripts, config files or short source files, that is often enough.
Compared with broader editors, it trades ecosystem size for a lighter, more Mac-native feel. Its feature set is practical rather than sprawling:
- Syntax highlighting for 60+ pre-installed languages, with custom definitions
- ICU regular-expression find and replace
- Outline menu for jumping to defined sections
- Split editor panes for viewing different parts of one document
- Automatic backup of unsaved work
- Scriptable macros in Python, Ruby, Perl, PHP, shell, AppleScript or JavaScript
- Character inspector and incompatible-character checking for encoding work
- CJK-friendly encoding detection, vertical text mode and line-height handling
How the trade-offs usually play out
| Need | CotEditor fits when | A different editor may fit when |
|---|---|---|
| Quick plain-text edits | You want fast launch and native behavior | You need deep project-wide refactoring |
| Multiple languages | Built-in highlighting covers common cases | You depend on a large plugin marketplace |
| Encoding and CJK text | Character inspection and vertical text matter | You mainly work in one ASCII-heavy language |
| Automation | Scripting in your preferred language is enough | You need integrated build, debug and test tooling |
| Configuration | You prefer a settings window | You prefer editing dotfiles and configs directly |
If you already use a heavier editor for large projects, CotEditor can serve as the lightweight second editor you keep open for notes, logs and one-off edits. A reasonable next step is to open a file you edit often, check whether its language is highlighted correctly, and try the outline menu and find-and-replace on real content before deciding whether it replaces or complements your current setup. macOS users who want a native alternative can also look at BBEdit, while cross-platform users may compare Visual Studio Code or Sublime Text.
How do I set up syntax highlighting for a custom language in CotEditor?
CotEditor handles custom syntax highlighting through its Settings window rather than a configuration file, so you define a new language and its rules in a dialog and it appears as a selectable syntax thereafter.
The basic workflow
- Open CotEditor's Settings and go to the Syntax pane (the same place where the pre-installed languages like HTML, PHP, Python, Ruby and Markdown are listed).
- Add a new syntax definition and give it a name — this is what will show up in the syntax selector.
- Define the language's elements: keywords, commands, types, attributes, variables, values, and numbers, plus comment delimiters and quote characters for strings.
- Add regular-expression-based rules for anything the simpler categories can't capture, and assign each category a color.
- Save, then set the new syntax as the one CotEditor should use for matching files, typically by associating file extensions or filenames with it.
Because settings live in a standard window, you can revisit and edit any of this later without touching files on disk. If your language shares most of its vocabulary with an existing one, the faster route is often to duplicate that definition and change the deltas rather than build from scratch.
Practical details worth knowing
- Regex rules use the ICU engine, the same engine behind CotEditor's find and replace, so patterns you test in the search field generally behave the same way in a syntax rule.
- Colors are per-category, not per-rule by default. If you need finer visual separation, split items into different categories rather than expecting a single category to render two ways.
- The Outline menu is driven by the same syntax definition. If you want to jump between functions or sections, define outline patterns as part of the language setup.
- Incompatible-character checking and encoding detection are separate features. They help when a file mixes encodings, but they don't affect highlighting rules.
- You can script around the editor. Macros in Python, Ruby, Perl, PHP, a UNIX shell, AppleScript or JavaScript are supported, which is useful if you generate syntax definitions or transform documents repeatedly.
A concrete scenario
Suppose you maintain a small in-house configuration language with # comments, quoted strings, and a fixed set of directives. You would add a syntax named after the language, list the directives as keywords, set # as the line-comment marker, set the quote characters, and attach the file extension your configs use. The first pass takes a few minutes; the payoff is that every config file you open afterward is colored and outline-navigable without further effort.
Choosing between duplicating and building fresh
| Situation | Better starting point |
|---|---|
| Language is a superset or dialect of an existing one | Duplicate the closest built-in syntax, then edit |
| Few keywords, unusual comment or string syntax | New definition from scratch |
| You mainly need outline navigation | Either, but prioritize outline patterns |
| You need many distinct colors | Plan categories before adding rules |
If you get stuck on rule behavior, the regular-expression rules are the part most worth testing incrementally — add one pattern, check a sample file, then add the next. The project is open source, so the issue tracker is the right place for bugs or feature requests if a rule type you need isn't available.
Can I use CotEditor to edit files in CJK languages?
Yes. CotEditor is explicitly built with CJK (Chinese, Japanese, Korean) users in mind, and its CJK-friendly features are among its selling points on CotEditor.
What this means in practice
- Encoding detection: CotEditor estimates various file encodings accurately, which matters for CJK text because the same characters can be stored in Shift-JIS, EUC-JP, GB18030, Big5, UTF-8 and other encodings. Misdetection is a common source of garbled (mojibake) text, so accurate estimation is the feature most CJK users will notice first.
- Vertical text mode: You can toggle to vertical writing, with line height kept correct. This is useful for Japanese and traditional Chinese documents, and it is not something most general-purpose editors handle well.
- Incompatible character checking: CotEditor lists characters in your document that cannot be converted into a target encoding. If you write in UTF-8 but must deliver a file in a legacy encoding, this tells you exactly which characters will break before you save.
- Syntax highlighting: Over 60 pre-installed languages, and you can add your own definitions, so CJK markup and code files are covered.
- Character inspector: Selecting a character shows its Unicode data in a popover, helpful when two visually similar CJK glyphs need to be distinguished.
A concrete scenario
Suppose you receive a Japanese CSV file from a partner and it opens as garbled text. You open it in CotEditor, let the encoding estimator suggest the right encoding, confirm the text reads correctly, edit it, then use the incompatible-character check before saving back to the original encoding so nothing silently gets replaced.
Decision criterion
If your work is mostly CJK plain text with encoding round-trips, vertical layout, or legacy encodings, CotEditor is a strong fit and it is free and open source. If you need heavy project-wide refactoring, integrated terminals, or deep plugin ecosystems, a full IDE may serve you better; CotEditor is positioned as a lightweight, macOS-native editor rather than an IDE.
A useful next step: open one of your real CJK files, check whether the encoding is detected correctly, and try the vertical text toggle to see whether the layout suits your documents.
How do I run scripts or macros in CotEditor?
CotEditor lets you automate the editor with scripts written in a language you already know — Python, Ruby, Perl, PHP, a UNIX shell, AppleScript, or JavaScript — rather than a proprietary macro language. The scriptable feature is listed among CotEditor's main capabilities on CotEditor, so this is a built-in part of the app rather than an add-on.
How scripting generally works in CotEditor
Scripts live in a scripts folder that CotEditor watches, and each script appears in the Script menu. From there you can run it against the current document. The typical workflow is:
- Open the Script menu and choose the option to open the Scripts folder (or find it via the app's settings).
- Drop a script file into the appropriate language subfolder — the file extension tells CotEditor which interpreter to use.
- Return to CotEditor; the script shows up in the Script menu, ready to run on the active document.
Because the menu is populated from that folder, adding, renaming or removing scripts is a matter of managing files, not editing configuration files — consistent with CotEditor's stated preference for settings windows over complex config files.
What a script can do
Scripts can read the current document's text, transform it, and write it back, so they are well suited to repetitive editing tasks: reformatting lists, converting between encodings or line endings, generating boilerplate, or extracting data. CotEditor's other features complement this. The syntax highlighting definitions and themes are editable from the settings window, and the outline menu and character inspector help you verify what a script changed. The incompatible-characters check is useful if a script also touches the file encoding.
Choosing a language
- AppleScript — best for controlling CotEditor and other macOS apps, not for heavy text processing.
- Python, Ruby, Perl — best for text manipulation, regular expressions and file processing.
- Shell — best for piping text through command-line tools.
- JavaScript — a reasonable middle ground if you already write it.
Pick whichever you can debug fastest; the script's job is usually small, so familiarity matters more than language features.
A practical next step
Start with one narrow task you repeat often — for example, stripping trailing whitespace or renumbering a list — and write the smallest script that does only that. Run it from the Script menu on a scratch document first, confirm the result, then keep it. Once that works, extend it rather than writing a large script from scratch.
For general macOS text-editing habits, CotEditor's focus on plain text and quick launch makes it a natural home for these small automations; if you need a broader editor ecosystem, GitHub hosts CotEditor's project page and issue tracker, where feature requests and bug reports about scripting belong.
What should I do if CotEditor cannot open a file due to encoding issues?
Start by determining whether the file is actually text or whether CotEditor is guessing the wrong encoding. CotEditor is built for plain text on macOS, and its CJK-friendly encoding detection is designed to estimate various file encodings accurately, but no detector is perfect. If a file opens as garbled characters rather than refusing to open, the problem is usually the selected encoding, not the file itself.
Practical steps
- Try reopening with an explicit encoding. In the open dialog, choose the file and set the encoding manually instead of relying on auto-detection. Common candidates are UTF-8, UTF-16, Shift_JIS, EUC-JP, GB18030 and Windows-1252.
- Reopen and reinterpret. If the document is already open but unreadable, use the encoding/reinterpret command to reload it with a different encoding without editing the bytes.
- Check for incompatible characters. CotEditor's Incompatible Characters feature lists characters that cannot be converted into a target encoding. If you see that list, the file contains characters the chosen encoding cannot represent, so pick a wider encoding such as UTF-8.
- Inspect suspicious characters. Use the Character Inspector to view Unicode data for selected characters; this helps distinguish a real encoding mismatch from lookalike or control characters.
- Confirm the file is text. A binary file, a damaged download, or a file on a network volume that failed to mount will not open as text regardless of encoding.
Choosing the right encoding
| Symptom | Likely cause | First thing to try |
|---|---|---|
| Garbled letters, wrong symbols | Wrong encoding selected | Reopen with UTF-8, then the regional encoding |
| File opens but some characters are boxes or question marks | Target encoding cannot represent them | Switch to UTF-8 |
| Nothing opens at all | File is binary, truncated or inaccessible | Verify the file type and location |
For a concrete scenario: you receive a Japanese CSV export and it opens as mojibake. Opening it as UTF-8 fails, so you reinterpret it as Shift_JIS and the text becomes readable. If you then need to save it for a system that expects UTF-8, check Incompatible Characters before saving to catch anything that would be lost.
As a next step, note the encoding that worked and set it as the default for that file type in CotEditor's settings window, so the same kind of file opens correctly the next time. If the file still will not open, the issue is likely outside encoding entirely and worth checking with the file's source.
User reviews (0)