# Micro（文本编辑器）

**Micro** 是一款免费、开源的、基于终端的文本编辑器，用 Go 语言编写，旨在易于使用、直观，同时充分发挥现代终端的全部能力。它以单一静态链接的二进制文件形式分发，没有任何外部依赖，其创作者将其定位为 nano 编辑器的继任者，面向那些希望在终端中使用熟悉的非模态键位的用户。<sup>[1](https://github.com/micro-editor/micro)</sup><sup> • </sup><sup>[2](https://www.infoworld.com/article/2248335/move-over-nano-the-micro-editor-has-arrived.html)</sup>

| 要点 | 详情 |
|---|---|
| 语言与许可 | 用 Go 编写，以 MIT 许可协议发布<sup>[1](https://github.com/micro-editor/micro)</sup> |
| 分发方式 | 单一静态二进制文件，无依赖；提供 Linux、macOS、Windows 及 BSD 各变体的预编译二进制文件<sup>[1](https://github.com/micro-editor/micro)</sup><sup> • </sup><sup>[2](https://www.infoworld.com/article/2248335/move-over-nano-the-micro-editor-has-arrived.html)</sup> |
| 首个稳定版本 | 1.0 版，2016 年 9 月<sup>[2](https://www.infoworld.com/article/2248335/move-over-nano-the-micro-editor-has-arrived.html)</sup> |
| 最新版本 | 2.0.15，2025 年 12 月 31 日发布<sup>[3](https://github.com/micro-editor/micro/releases)</sup> |
| 可扩展性 | Lua 插件系统，内置插件管理器，可安装、移除和更新插件<sup>[1](https://github.com/micro-editor/micro)</sup><sup> • </sup><sup>[4](https://github.com/micro-editor/micro/blob/master/runtime/help/plugins.md)</sup> |
| 语法高亮 | 支持 130 多种语言，提供 16 色、256 色和真彩色主题<sup>[1](https://github.com/micro-editor/micro)</sup> |
| 人气 | GitHub 上约 29.7k 星标、1.4k 复刻<sup>[1](https://github.com/micro-editor/micro)</sup> |
| 编辑模型 | 默认使用常见键位（Ctrl-s、Ctrl-c、Ctrl-v、Ctrl-z）；不提供 Vim 模拟或 Vi 键位<sup>[1](https://github.com/micro-editor/micro)</sup><sup> • </sup><sup>[5](https://mobilestalk.net/software/micro/review/)</sup> |

## 目的与定位

Micro 的名字表明了它的意图：主要开发者扎卡里·耶迪迪亚（Zachary Yedidia）称它“在某种程度上是 Nano 编辑器的继任者，因为它易于安装、应急时也好用”，同时也希望它能成为那些偏好终端工作或不得不通过 SSH 编辑文件的用户乐于日常使用的编辑器。<sup>[2](https://www.infoworld.com/article/2248335/move-over-nano-the-micro-editor-has-arrived.html)</sup><sup> • </sup><sup>[1](https://github.com/micro-editor/micro)</sup> 它在终端编辑器的版图中介于 nano 与 Vim 之间：与 Vim 不同，它没有模态编辑；与 nano 不同，它提供分屏、标签页、多光标和插件系统。<sup>[6](https://www.textbookoflinux.com/software/micro.html)</sup><sup> • </sup><sup>[5](https://mobilestalk.net/software/micro/review/)</sup>

耶迪迪亚选择 Go 作为核心，是因为基于 Go 的终端库 Tcell 提供了其他库所缺乏的可移植性和真彩色支持，也因为 Go 的静态链接和便捷的二进制嵌入能让用户在一个下载文件中获得所需的一切。<sup>[2](https://www.infoworld.com/article/2248335/move-over-nano-the-micro-editor-has-arrived.html)</sup> Micro 现在在 micro-editor 组织下维护着自己的 tcell 分支。<sup>[7](https://github.com/micro-editor)</sup>

## 功能

该编辑器自带其 README 所称的“合理默认值”，因此开箱即用几乎无需配置。<sup>[1](https://github.com/micro-editor/micro)</sup> 其功能包括：

- 多光标、分屏和标签页，底部有类似 nano 的菜单以帮助回忆键位<sup>[1](https://github.com/micro-editor/micro)</sup>
- 广泛的鼠标支持：拖动选择、双击选词、三击选行<sup>[1](https://github.com/micro-editor/micro)</sup>
- 持久撤销、简单的自动补全、宏、内置的差异边栏，以及带错误通知的自动代码检查<sup>[1](https://github.com/micro-editor/micro)</sup>
- 支持 130 多种语言的[语法高亮](https://www.edgepedia.org/zh/syntax-highlighting)，配色方案最高支持真彩色<sup>[1](https://github.com/micro-editor/micro)</sup>
- 系统剪贴板集成、Unicode 支持和自动换行<sup>[1](https://github.com/micro-editor/micro)</sup>

命令通过 Ctrl-e 打开的命令栏输入，内置帮助系统涵盖键位、配色和插件等主题。<sup>[8](https://github.com/micro-editor/micro/blob/master/runtime/help/help.md)</sup>

## 插件与配置

**插件**用 Lua 编写，通过 `onAction`、`preAction` 和 `onRune` 等回调挂接到编辑器行为中，这些回调在可绑定动作或字符插入之前或之后运行。<sup>[4](https://github.com/micro-editor/micro/blob/master/runtime/help/plugins.md)</sup> 内置插件管理器可在编辑器内通过 `> plugin` 调用，或在 shell 中通过 `micro -plugin` 调用，它从频道获取插件；默认使用托管在 GitHub 上的官方插件频道，用户可以通过 `pluginchannels` 和 `pluginrepos` 选项添加第三方频道或直接的插件仓库。<sup>[4](https://github.com/micro-editor/micro/blob/master/runtime/help/plugins.md)</sup> 捆绑插件包括 `autoclose`、`comment`、`linter`、`literate`、`status` 和 `diff`，其中最后一个将差异边栏与 Git 集成。<sup>[9](https://github.com/micro-editor/micro/blob/master/runtime/help/options.md)</sup>

配置存放在一个目录中，其解析顺序为 `$MICRO_CONFIG_HOME`，然后是 `$XDG_CONFIG_HOME/micro`，最后是 `~/.config/micro`。在编辑器中更改的选项会写入 `settings.json`，键位可以在 `bindings.json` 中重新绑定，或使用 `> bind` 命令；绑定还可以串联动作，例如将 Alt-s 绑定为 `Save,Quit`。<sup>[9](https://github.com/micro-editor/micro/blob/master/runtime/help/options.md)</sup><sup> • </sup><sup>[10](https://github.com/micro-editor/micro/blob/master/runtime/help/keybindings.md)</sup>

## 剪贴板行为

`clipboard` 选项有三个值：`external`（默认值），在 Linux 上使用 xclip 或 xsel 等工具，在 macOS 上使用 pbcopy/pbpaste，在 Windows 上使用系统调用；`terminal`，使用 OSC 52 协议通过终端模拟器传递剪贴板内容；以及 `internal`，仅在 micro 内部保留副本。<sup>[9](https://github.com/micro-editor/micro/blob/master/runtime/help/options.md)</sup> 在 Linux 桌面环境中，必须安装 xclip 或 xsel（X11）或 wl-clipboard（Wayland）才能访问系统剪贴板；没有它们，micro 会回退到外部应用程序无法看到的内部剪贴板。<sup>[1](https://github.com/micro-editor/micro)</sup>

通过 SSH 处理剪贴板是一个有文档记录的设计考量。由于 micro 运行在远程机器上，其 Ctrl-v 粘贴读取的是远程机器的剪贴板，而非本地的；推荐的方法是将 `clipboard` 设为 `terminal` 并使用支持 OSC 52 的终端，这样复制和粘贴在 SSH 上和本地都能正常工作。<sup>[11](https://github.com/micro-editor/micro/blob/master/runtime/help/copypaste.md)</sup> 对 OSC 52 的支持因终端而异：Kitty、st、alacritty 和 foot 支持它（部分默认禁用读取），iTerm2 和 wezterm 仅支持写入，而 gnome-terminal 不支持。<sup>[11](https://github.com/micro-editor/micro/blob/master/runtime/help/copypaste.md)</sup>

## 安装与平台

Micro 可以通过预编译二进制文件、快速安装脚本（`curl https://getmic.ro | bash`）、Eget 工具安装，或使用 Go 1.19 及以上版本从源码构建。<sup>[1](https://github.com/micro-editor/micro)</sup> 它的打包范围很广：Ubuntu 和 Debian 上的 apt、Fedora 上的 dnf、Arch 上的 pacman、Gentoo 上的 emerge、SUSE 上的 zypper、macOS 上的 Homebrew 和 MacPorts、Windows 上的 [Chocolatey](https://www.edgepedia.org/zh/chocolatey)、Scoop 和 WinGet，以及 OpenBSD 的 ports 树和 pkgsrc。<sup>[1](https://github.com/micro-editor/micro)</sup> Debian 的 amd64 软件包约为 4,197.9 kB，安装后大小为 14,685.0 kB。<sup>[12](https://packages.debian.org/sid/micro)</sup> 2.0.15 版新增了对 Solaris、OpenBSD（32 位）和 NetBSD 的终端模拟支持，并通过禁用 CGO 使所有构建版本明确为完全静态。<sup>[3](https://github.com/micro-editor/micro/releases)</sup>

## 评价与比较

评论者称 micro 将图形编辑器的易用性带到了终端，对于觉得 vi 太模态化、nano 又太有限的用户来说是一个很好的中间选择。<sup>[13](https://www.linux-magazine.com/Issues/2021/248/Micro)</sup><sup> • </sup><sup>[6](https://www.textbookoflinux.com/software/micro.html)</sup> 它默认使用常见的图形界面式快捷键（Ctrl-c 和 Ctrl-v 用于复制粘贴）常被认为是其主要吸引力，因为这消除了模态编辑器的学习曲线。<sup>[1](https://github.com/micro-editor/micro)</sup><sup> • </sup><sup>[14](https://itsfoss.com/micro-editor-linux/)</sup> 针对特定工作流需要核对的点包括：缺少 Vim 模拟或 Vi 键位，以及上文提到的 Linux 剪贴板工具要求。<sup>[5](https://mobilestalk.net/software/micro/review/)</sup>

## References

1. [micro-editor/micro on GitHub](https://github.com/micro-editor/micro)
2. [Paul Krill, "Move over, Nano: The Micro editor has arrived," InfoWorld, September 1, 2016](https://www.infoworld.com/article/2248335/move-over-nano-the-micro-editor-has-arrived.html)
3. [Releases · micro-editor/micro](https://github.com/micro-editor/micro/releases)
4. [micro runtime help: plugins.md](https://github.com/micro-editor/micro/blob/master/runtime/help/plugins.md)
5. [Micro Review, MobilesTalk](https://mobilestalk.net/software/micro/review/)
6. [micro · Textbook of Linux](https://www.textbookoflinux.com/software/micro.html)
7. [micro-editor organization on GitHub](https://github.com/micro-editor)
8. [micro runtime help: help.md](https://github.com/micro-editor/micro/blob/master/runtime/help/help.md)
9. [micro runtime help: options.md](https://github.com/micro-editor/micro/blob/master/runtime/help/options.md)
10. [micro runtime help: keybindings.md](https://github.com/micro-editor/micro/blob/master/runtime/help/keybindings.md)
11. [micro runtime help: copypaste.md](https://github.com/micro-editor/micro/blob/master/runtime/help/copypaste.md)
12. [Debian package details for micro in sid](https://packages.debian.org/sid/micro)
13. [Scott Nesbitt, "Small and Simple," Linux Magazine, Issue 248/2021](https://www.linux-magazine.com/Issues/2021/248/Micro)
14. ["Micro: Making File Editing Easier in Linux Terminal," It's FOSS](https://itsfoss.com/micro-editor-linux/)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Named software products and platforms › Office and business software › Titles symbols to M › Titles H to M

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/micro-text-editor

English original: https://www.edgepedia.org/micro-text-editor
