跳到正文

CotEditor

CotEditor Project · 免费的原生 Mac 纯文本编辑器,支持语法高亮、编码工具、文件夹搜索和脚本化文本工作流程。

Cask写作与笔记自带更新 8,705
主页
安装命令
brew install --cask coteditor
近 30 天安装
1,506
App榜第 206
近一年安装
1.8万
365 天累计
最新版本
7.1.3
下载大小
27MB
dmg
更新节奏
每两周
近 30 天 3 个版本

介绍

CotEditor 是一款免费的原生 macOS 纯文本编辑器,适用于源代码、配置文件、标记语言和日常文本。它提供语法高亮、文档大纲、行号、字符信息、分屏编辑、正则表达式查找与替换,以及文本编码和换行符工具。它直接编辑文本本身,而不像文字处理器那样生成富文本排版。

编辑文本和文件夹

打开文本文件或文件夹,选择语法,并在一个或多个视图中检查文本。7.1 的文件夹搜索可跨已打开文件夹中的文件进行搜索。模式可让你为不同工作流程选择缩进样式和宽度。编辑器支持转换换行符和编码,并提供检查字符以及识别无法用某种编码表示的文本的工具。转换供其他程序使用的文件时,请确认转换结果;编码或换行符的更改可能影响兼容性。

查找与替换支持正则表达式和可重复使用的替换定义。使用合适的范围,并在执行“全部替换”前检查匹配项,尤其是在处理重要文件时。CotEditor 是文本编辑器,并非完整的 IDE、编译器或调试器;编辑脚本不会安装其语言运行时或依赖项。

安装和兼容性

CotEditor7.1.1 需要 macOS26 Tahoe 或更高版本,可在 Intel x86-64 和 Apple Silicon ARM64 上原生运行。直接下载的 DMG 为26,594,816 字节,不含安装后占用的存储空间。从 DMG 将应用拷贝到“应用程序”文件夹并打开。7.0.9 历史版本要求 macOS15+,但这不会改变当前7.1版本的要求。

直接下载版本免费,无需CotEditor账户、订阅或激活。Mac App Store 是另一种发行方式,并遵循 Apple Account 的常规要求。直接下载版本使用 Sparkle 更新;App Store 版本则通过 App Store 更新。文档访问受沙盒限制,并以用户选择的文件和文件夹为基础,因此请通过应用支持的文件打开流程授予访问权限,不要假定它能随意修改所有受保护路径。

脚本和自动化

CotEditor 支持通过“脚本”菜单运行脚本,包括 AppleScript 和可执行 UNIX 脚本。UNIX 脚本可通过标准输入接收所选文本或文档内容,并将输出返回编辑器。脚本需要可用的解释器,并且必须使用适当的文件扩展名和可执行权限。

Python 脚本需要另行安装兼容的 Python 解释器。官方指南支持使用诸如 /usr/bin/env python3 的 shebang,但提醒 CotEditor 的 PATH 可能与 Terminal shell 的 PATH 不同。需要特定环境时,请指定解释器的绝对路径。编辑器不保证附带 Python 运行时,也不保证与所有软件包环境普遍兼容。只运行可信的自动化脚本:脚本可能更改文档内容,并在其可用权限范围内执行其他操作。

保存和恢复

CotEditor 提供 macOS 风格的自动保存和编辑工作恢复机制,但这些机制不能替代独立备份。保存、替换文本或运行脚本都可能更改实际文档。重要文件请使用版本控制或单独备份,并在其他地方使用转换或重写后的文档前进行检查。

许可和费用

CotEditor 免费且开源。其当前源代码许可证为 Apache License2.0,而图像资源另行采用 Creative Commons Attribution-NonCommercial-NoDerivatives4.0 许可证。源代码许可证并不意味着可以不受限制地重复使用项目中的所有图形。使用该编辑器无需付费方案。

官方来源:CotEditor、源代码和要求、7.1.1 版本、UNIX 脚本指南、许可证。

基本信息

价格
免费下载 · US$0.00
芯片
Apple 芯片 · Intel
自动更新
是
仓库
GitHub 仓库 · 1 天前更新★8,705
开发者
CotEditor Project
Homebrew
可以安装,应用会自行更新
其他名称
coteditor
主页
coteditor.com
软件包标识符
coteditor

核查日期

7.2.0-rc 更新内容

新版本 · 来自 GitHub Release

system requirements: macOS 26 and later

New Features

  • Add the Hungarian localization (thanks to Torma Zsolt!).

Improvements

  • Improve the performance of undo and redo in large documents.
  • Improve the performance of the file browser when many files in the opened folder change at once.
  • Update the AppleScript, BBCode, CoffeeScript, Dart, Erlang, Fortran, Git Config, INI, jq, JSON, Markdown, Perl, R, reStructuredText, SVG, Tcl, Verilog, XML, DTD, and YAML syntaxes to improve performance and highlighting accuracy.
  • Improve VoiceOver support (thanks to Torma Zsolt!).
  • Update tree-sitter-c-sharp to 0.24.0.
  • Update tree-sitter-php to 0.25.2.
  • [trivial] Display the setting name in the error message when importing a setting fails.
  • [trivial] Display errors in the cot command as a brief message instead of a Python traceback.
  • [beta] Optimize regular-expression-based syntax highlighting in large documents.
  • [beta] Update Czech, Polish, and Portuguese localizations.

Fixes

  • Fix several issues where the editor’s font and indentation were reset, such as when opening documents with the “Detect indent style on document opening” option, splitting the editor, or relaunching the app.
  • Fix several issues in the cot command, such as where the --new option could empty existing files or the --wait option stopped waiting when the window was minimized.
  • Fix an issue where Keyboard Maestro and other accessibility tools could not find the Text menu.
  • Fix an issue in the file browser where the item with the old name remained after changing only the capitalization of its name.
  • Fix an issue in the file browser where changes were no longer reflected after renaming or moving the opened folder or its subfolders.
  • Fix an issue in the file browser where both a file and a folder with the same name appeared after one replaced the other.
  • Fix an issue in the file browser where filtering did not work when the folder contained a subfolder that could not be read.
  • Fix an issue in the file browser where the filter results were not updated correctly after files were changed outside the app.
  • Fix an issue where importing a settings archive exported from CotEditor 6.2 failed if it included custom syntaxes.
  • Fix an issue where the AppleScript replace command could fail to replace a single match when the regular expression used lookahead.
  • [trivial] Fix an issue in the file browser where filtering with only certain combining marks showed all items.
  • [trivial] Fix an issue where importing a settings archive failed if it contained hidden files, such as .DS_Store.
  • [trivial] Fix an issue where importing a setting listed it twice if a custom setting with the same name but different capitalization already existed.
  • [trivial] Fix an issue where the line and column of the insertion point in the status bar could remain outdated after the document was reloaded with changes made outside the app.

Full Changelog: https://github.com/coteditor/CotEditor/compare/7.2.0-beta...7.2.0-rc

如何在 Mac 上安装 CotEditor

Homebrew 会把应用安装到“应用程序”文件夹。

不用 Homebrew 安装

直接下载 Homebrew 使用的同一个文件: 安装细节

卸载 CotEditor 与可选的数据清理

卸载命令
brew uninstall --cask coteditor

普通卸载会删除应用本身,设置和缓存会保留。

深度清理(可选)
卸载命令
brew uninstall --zap --cask coteditor

--zap 还会删除 Homebrew 定义里列出的设置、缓存等文件,其中可能有其他应用共用的数据,删除后无法恢复;它也不保证没有任何残留。请先备份需要保留的数据;如要保留设置和缓存,请不要加 --zap。

关于 CotEditor 的常见问题

CotEditor 安全吗?

CotEditor 收录在 Homebrew 官方软件库中,没有被停用。自 2026 年 9 月起,Homebrew 会停用没有通过 macOS Gatekeeper 检查的应用。安装时,Homebrew 会用 SHA-256 校验值核对来自 github.com 的安装包。过去 30 天,它通过 Homebrew 安装了 1,506 次。

CotEditor 免费吗?

Mac App Store 上的“CotEditor”可以免费下载。Homebrew 安装的是开发者网站提供的版本,价格和功能可能与 App Store 版不同。来源:apps.apple.com,核查于 2026年11月23日。

怎样在 Mac 上彻底卸载 CotEditor?

运行 brew uninstall --cask coteditor。它会退出应用。要连设置和缓存一起删除,运行 brew uninstall --zap --cask coteditor。--zap 还会删除 Homebrew 定义里列出的设置、缓存等文件,其中可能有其他应用共用的数据,删除后无法恢复;它也不保证没有任何残留。请先备份需要保留的数据;如要保留设置和缓存,请不要加 --zap。这会再删除 8 处文件和文件夹,包括 ~/Library/Containers/com.coteditor.CotEditor。

CotEditor 支持 Apple 芯片(M1 及更新)的 Mac 吗?

Apple 芯片和 Intel 芯片的 Mac 都能用 Homebrew 安装,两者使用同一个安装包。

CotEditor 支持中文吗?

Mac App Store 页面列出的界面语言包括中文。来源:apps.apple.com,核查于 2026年11月23日。

CotEditor 的设置和数据保存在哪里?

设置保存在 ~/Library/Preferences/com.coteditor.CotEditor.plist。数据保存在 ~/Library/Containers/com.coteditor.CotEditor。这些位置来自 Homebrew 的清理清单。

CotEditor 的最新版本是多少?

最新版本是 7.1.3,Homebrew 收录于 2026年10月28日。CotEditor 会自动更新;想用 Homebrew 更新时,运行 brew upgrade --cask --greedy coteditor。

安装 CotEditor 还会装上什么?

还会装上 1 个命令行工具:cot。

相似应用

  • MarkEdit免费的 macOS 原生 Markdown 编辑器,提供 CodeMirror 编辑、文档导航和可选扩展。
  • Joplin开源笔记与待办应用,支持 Markdown、附件、笔记本、可选加密同步及可扩展的桌面工作流。
  • Quarto一个开源技术出版系统,可将Markdown和计算笔记本转换为报告、网站、书籍和演示文稿。
  • TyporaMarkdown 编辑器,支持实时格式化、文件侧边栏、大纲、表格、代码块和导出流程,提供专注写作视图。
查看更多