新版 Homebrew 需先执行 brew trust 才能加载该 tap 的 cask;若已通过 App 安装 mayoi 命令,需先在 File 菜单卸载再走 Homebrew,避免 PATH 上出现两个命令;从源码构建需 Go 1.27 或更高,Linux 还需 GTK 3。
Mayoi
sorryccMIT活跃维护用 Go 写的小巧快速代码编辑器,界面由 GPU 原生绘制,不依赖 webview 或 Electron,启动和操作都很轻快。
A small, fast code editor written in Go, with a native GPU-drawn UI (no webview, no Electron)
brew tap --custom-remote sorrycc/mayoi https://github.com/sorrycc/Mayoi.git
brew trust sorrycc/mayoi
brew install --cask mayoiREADME 未说明显存或 GPU 型号要求;macOS 需 13 或更高版本,Linux 需 GTK 3(如 Ubuntu 22.04+),Windows 提供安装包。
用 Go 写的轻量代码编辑器,原生 GPU 绘制界面,不用 webview 和 Electron
用 Go 写的小巧快速代码编辑器,界面由 GPU 原生绘制,不依赖 webview 或 Electron,启动和操作都很轻快。
核心能力
- 用 MyGo 在 GPU 上绘制原生 UI,打包体积约 18 MB
- 内置 Vim 模式,支持 motions、操作符、文本对象与宏
- 集成 Git 视图,可暂存、提交、amend、查看提交图与 blame
- 用 libghostty-vt 提供终端,可放在面板、侧栏或标签页
- 通过系统 ssh 打开远程文件夹,搜索、Git、终端在远端运行
容易踩的坑
- v0.19.2Mayoi 0.19.2最新正式版2026-11-09 · 2026-11-09 13:31 UTC
- With
terminalBackend"hc", terminals show up in the Herdr app, in a space for each folder. - Terminals already running in herdr-core show up in Herdr too once Mayoi attaches them again.
- Set
terminalBackendHcShowInHerdrtofalseto keep new terminals out of the Herdr app. - Overwriting an SSH file that changed on its host no longer swaps the editor back to the host's old text.
- With
- v0.19.1Mayoi 0.19.12026-11-09 · 2026-11-09 12:25 UTC
查看更新说明
- Word Count and TODOs come with Mayoi but start off; turn them on in Settings → Plugins.
- A plugin's
plugin.jsoncan say"enabled": falseto start off until you turn it on.
- v0.19.0Mayoi 0.19.02026-11-09 · 2026-11-09 11:56 UTC
查看更新说明
- Plugins → Show Running Plugins opens a live table of each plugin's state, CPU time, memory and crashes.
- Click a column head in Running Plugins to sort by it; values refresh every second while the tab shows.
- Each row of Running Plugins can restart its plugin, turn it off, open its details, or show its log.
- Plugins → Show Plugin Log opens a live log that follows new lines, with a Jump to latest pill.
- Filter the Plugin Log by plugin, level and text, and use Copy and Clear in its bar.
- The Plugin Log keeps the last 10,000 lines and stays fast however long it gets.
- A plugin view's open folders and selection are now kept per window.
- Two lists in the same plugin view no longer show the same row as selected.
- Built-in status bar items that do nothing on click, such as the problem at the cursor, show their tooltip again.
- A plugin's settings now live only in its details; its row on Settings → Plugins links to them.
- Plugin sidebar views, such as TODOs, match the Explorer's rows, file icons, hover and selection.
- Plugin sidebar views show a loading state, a clear empty state, and fade in when their content arrives.
- Plugin status bar items, such as the word count, glide to a new width instead of shifting their neighbours.
- Plugin status bar items sink when pressed and show their tooltip even when they have no command.
- Plugin pick boxes look like the command palette, with its key hints and a shake when nothing matches.
- The command palette, pickers and prompts fade and scale in as they open, unless Reduce Motion is on.
- Click a plugin on the Settings → Plugins page to open its details;
Escgoes back to the list. - A plugin's details list its commands with their shortcuts, menus, status items, views, themes and more.
- A plugin's details show its memory, CPU time and start time, refreshed every second while open.
- A plugin's details show its recent log lines and its settings, with Open Full Log for the whole log.
- Plugin errors now show on the Plugins page as soon as they happen.
- The disabled Install button on the Plugins page now looks clearly disabled in dark themes.
mayoi plugin newfills inauthorfrom your Git user name.- Find in Files (
Shift+Cmd+F) selects the previous query, so typing or pasting replaces it. - Drag a file's tab onto a project in the rail to move it there; hold
Optionto copy it instead. - Rest a dragged tab on a project in the rail to switch to it, then drop the tab where you want it.
- Unsaved changes come along when a tab moves to another project.
- Right-click a tab and choose Move to Project to send it to another project.
- New plugins: folders of JavaScript or TypeScript in
~/.mayoi/plugins, which Mayoi runs with no Node or build step. - Plugins add commands, shortcuts, menu items, status bar items, sidebar views, previews, themes, languages and snippets.
mayoi plugin install <git-url>installs a plugin, andlist,updateandremovemanage them.mayoi plugin new <name>writes a new plugin, andmayoi plugin devreloads it each time you save.mayoi plugin packcopies the npm packages a plugin imports into it.- The Plugins menu, and the Plugins page of the settings window, install, update, remove and configure plugins.
- Plugins → Show Plugin Log and Show Running Plugins show what plugins logged and how much they use.
- A plugin that loops or keeps too much memory is stopped, and
mayoi --disable-pluginsturns plugins off. - The Plugins settings page shows each plugin's version, author, source, and a colored dot for its state.
- The Plugins page asks before it removes a plugin, and shows install and update errors on the plugin's row.
- While the plugin index loads, the Plugins page shows placeholder rows, and Try Again if it fails.
- Switches in the settings window respond to hover and stretch while held.
- A plugin's
plugin.jsonand its index entry can
- v0.18.2Mayoi 0.18.22026-11-07 · 2026-11-07 15:25 UTC
查看更新说明
- On Windows, right-click menus no longer cut off the end of their labels, as in Chinese.
- The Markdown preview highlights
==text==and<mark>text with a yellow background. - In Markdown, typing
=,*,_,~or$over a selection wraps it; type it twice for==or**. - The Markdown editor highlights
==text==with a yellow background, as Obsidian does. - The Markdown editor colors bold, italic and struck text between Chinese characters, as in
会**整体**线. - The Markdown editor shows
**bold**in bold and draws a line through~~struck~~text.
- v0.18.1Mayoi 0.18.12026-11-06 · 2026-11-06 09:28 UTC
查看更新说明
- Opening a folder you switched away from no longer shows the terminals another window kept from it.
- On Windows, lines starting with tabs, like Go code, keep their indent, at four columns a tab.
- On macOS, Mayoi appears in Finder's Open With menu for text, Markdown and source code files.
- AI commit messages leave out the lines of more secret files, like
.envrc,*.tfvarsand~/.awsfiles. - A changed
.envor key file that is already committed no longer has its lines sent to the AI either. - Keys, tokens and passwords in any changed line are swapped for
[left out]before the diff goes to the AI. - New
aiSecretFilessetting adds your own patterns of files whose lines AI commit messages leave out.
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
https://github.com/user-attachments/assets/673e7907-2b2c-4ed6-9093-1ba9633cd61c
Features
- Editor: tabs, Chroma syntax highlighting, indent guides, sticky scroll, breadcrumbs and word wrap
- Smart editing: auto-indent, auto-closing brackets and quotes, line commands, and per-tab undo
- Vim mode: normal, insert and visual modes, with motions, operators, text objects, counts and
., registers, macros, marks, search, and:commands as:s,:gand:normal - Columns: split the editor side by side and drag tabs between columns
- Explorer: a live file tree that follows the disk and dims Git-ignored files
- Quick open: fuzzy file search, go to line (
:42), go to symbol (@) and a command palette (>, ⇧⌘P) - Find and replace: case, whole-word and regex matching, searched in the background in large files
- Search: find and replace across the folder's files (⇧⌘F, ⇧⌘H), with files to include and exclude, and a preview of each replacement
- Git: a source control view to stage, commit, amend, undo, pull and push, every change in one diff, folded around the changes, inline or side by side, a graph of the commits with their branches and tags, each with its own diff, gutter marks that revert or stage a change, branches and blame
- Terminal: Ghostty's emulator (libghostty-vt), in the bottom panel, at a side of the window, or in a tab
- Remote SSH: open a folder on another machine with the system's
ssh, nothing installed there: the Explorer, search, Git and terminals run on the host, and its ports forward to this machine - Image viewer: PNG, JPEG, GIF, WebP and BMP
- Previews: a live preview of Markdown, SVG and Mermaid beside the source (⇧⌘V), with the Markdown's Mermaid blocks drawn as diagrams and its LaTeX math as formulas
- Windows: a window per folder or every folder in one window as project tabs, a welcome page with the recent
folders and hosts, Open Recent (⌃R), and a
mayoishell command that opens files at a line, compares them, waits for them to close and runs any command - Themes: light and dark, The Matrix with digital rain and the White Rabbit, Purple Gold, the Halloween themes Jack-o'-Lantern, Witch's Brew and Blood Moon, and Claude, Qoder, Grok Bot and Cursor, each in light and dark
- Auto save, and every window reopened as you left it, with its columns, tabs and carets
- Settings: a settings window with search and a keyboard shortcuts editor, over JSON files applied as you save
them, with the code's and the terminal's fonts, weight, ligatures and line height, keyboard shortcuts in VS Code's
format, and a folder's own settings in
.mayoi/settings.json(see docs/SETTINGS.md) - AI commit messages: signed in, write the commit message from the changes with Mon's AI gateway
- Settings sync: sign in with GitHub or Google, and your settings and keyboard shortcuts follow you between machines
See docs/FEATURES.md for the details, docs/ARCHITECTURE.md for a tour of the source and how fast it runs, and CONTRIBUTING.md to build, test and release Mayoi.
Tour
Installation
macOS
Requires macOS 13 or later. Install with Homebrew on Apple Silicon or Intel:
brew tap --custom-remote sorrycc/mayoi https://github.com/sorrycc/Mayoi.git
brew trust sorrycc/mayoi
brew install --cask mayoi
Recent Homebrew refuses to load casks from a tap you haven't trusted, which brew trust allows once. On an older
Homebrew without that command, skip that line.
Or download the DMG for your Mac from Releases and drag Mayoi to Applications. Both methods install the signed, notarized app.
Open Mayoi from Applications, or run mayoi . or mayoi <file> in a shell.
Homebrew installs and removes the shell command with the app. For a DMG installation, choose
File → Install 'mayoi' Command in the app instead.
If you already installed the command through Mayoi, choose File → Uninstall 'mayoi' Command before
installing with Homebrew, so only one mayoi command is on your PATH.
Mayoi checks for updates automatically. To upgrade with Homebrew, run brew update && brew upgrade --cask mayoi;
if it refuses to load the cask from an untrusted tap, run brew trust sorrycc/mayoi first.
Linux
Requires GTK 3, such as on Ubuntu 22.04 or later:
curl -fsSL https://github.com/sorrycc/Mayoi/releases/latest/download/install.sh | sh
The installer adds Mayoi to ~/.local, with the mayoi command and an entry in the applications menu.
Windows
Download the installer for your architecture from Releases.
Build from source
Requires Go 1.27 or later; Linux also needs GTK 3. From the repository:
go run ./cmd/mayoi ~/some/project # open a folder or a file
go tool mygo build # build build/darwin-arm64/Mayoi.app and a .dmg
See CONTRIBUTING.md for development and testing.
Keyboard shortcuts
| Shortcut | Action |
|---|---|
| ⌘P / ⇧⌘O / ⌃G | Quick open / go to symbol / go to line |
| ⌘F / ⌥⌘F / ⌘G | Find / replace / next match |
| ⇧⌘F / ⇧⌘H | Find in files / replace in files |
| ⌘S / ⇧⌘S / ⌥⌘S | Save / save as / save all |
| ⌘O / ⌥⌘O / ⌃R | Open folder / open folder in a new window / open recent |
| ⌘N / ⌘W / ⌘1…9 / ⌃Tab | New file / close tab / go to tab / next tab |
| ⇧⌘] / ⇧⌘[ / ⌃⌘1…9 | Next / previous / go to project, with project tabs |
| ⌘\ / ⌥⌘→ / ⌥⌘← | Split right / next column / previous column |
| ⌘B / ⌃` / ⌃⇧` | Toggle sidebar / toggle terminal panel / new terminal |
| ⌘Z / ⇧⌘Z | Undo / redo |
| Tab / ⇧Tab, ⌘] / ⌘[ | Indent / outdent |
| ⌘/ | Toggle line comment |
| ⌥↑ / ⌥↓, ⇧⌥↑ / ⇧⌥↓ | Move line / copy line |
| ⇧⌘K / ⌘↵ / ⇧⌘↵ | Delete line / insert line below / insert line above |
| ⌘L / ⇧⌘\ | Select line / go to bracket |
| ⌘= / ⌘- / ⌘0 | Zoom the whole window in / out / reset |
| ⇧⌘V | Toggle SVG preview |
| ⌥Z | Toggle word wrap for the current tab |