Scripts2026年4月14日·1 分钟阅读

micro — A Modern Terminal Text Editor That Just Works

micro is a terminal-based text editor with familiar shortcuts (Ctrl+S, Ctrl+C, Ctrl+V). No Vim/Emacs learning curve, mouse support, plugin system, syntax highlighting for 100+ languages — the modern alternative to nano.

Introduction

micro is what nano should have been in 2026: a terminal editor with the familiar desktop shortcuts (Ctrl+S to save, Ctrl+C/V for clipboard), mouse support, and syntax highlighting built in. No "press Esc then :wq" confusion.

With over 28,000 GitHub stars, micro is the go-to editor for developers who live in a terminal occasionally but don't want to spend a month learning Vim. It's a single Go binary, works anywhere, and has a plugin ecosystem for LSP, linters, and file trees.

What micro Does

micro gives you a modern editing experience: multi-cursor (Ctrl+D), split panes, find/replace with regex, macros, tabs, mouse-driven selection, and Lua-scripted plugins. Key bindings are customizable via a simple JSON file.

Architecture Overview

[Go Binary]
      |
[Terminal TUI (tcell)]
      |
  +------+------+------+
  |      |      |      |
Editor  Tabs   Splits  Mouse
  |
[Syntax Highlighting]
  100+ languages via built-in rules
      |
[Plugin System (Lua)]
  micro-plugin-manager
  filemanager, go, linter, manipulator,
  autofmt, aspell, status, comment, ...
      |
[Config]
  ~/.config/micro/settings.json
  ~/.config/micro/bindings.json

Self-Hosting & Configuration

// ~/.config/micro/settings.json
{
  "autosu": false,
  "colorscheme": "monokai",
  "indentchar": " ",
  "tabsize": 4,
  "tabstospaces": true,
  "syntax": true,
  "mouse": true,
  "softwrap": true,
  "hlsearch": true
}
// ~/.config/micro/bindings.json — Ctrl/Cmd shortcuts
{
  "Ctrl-b": "command:bookmark",
  "Ctrl-e": "command-edit:",
  "Alt-]": "NextTab",
  "Alt-[": "PreviousTab"
}
# Install plugins inside micro
Ctrl+e  then  plugin install filemanager
Ctrl+e  then  plugin install linter
Ctrl+e  then  plugin install go

Key Features

  • Sane default shortcuts — Ctrl+S save, Ctrl+C/V clipboard, Ctrl+Q quit
  • Multi-cursor — Ctrl+D to select next occurrence (like VS Code)
  • Splits + Tabs — multiple files side by side
  • Mouse support — click to move, drag to select, scroll to scroll
  • Syntax highlighting — 100+ languages out of the box
  • Plugin system (Lua) — file manager, LSP, linter, formatter
  • Single binary — no dependencies, runs anywhere Go compiles
  • Macros + regex find/replace — enough for most editing tasks

Comparison with Similar Tools

Feature micro nano Vim Neovim Helix
Learning curve Very low Very low High High Medium
Mouse support Native No Limited Yes Yes
Multi-cursor Yes No Via plugins Via plugins Yes (selections)
Plugin language Lua None Vimscript Lua No plugins
LSP Via plugin No Via plugin (coc) Yes (built-in) Yes (built-in)
Best For Quick edits, SSH sessions Absolute minimum Power users Modern Vim Modal + modern

FAQ

Q: micro vs nano? A: micro is nano for the modern age — same "no learning curve" promise but with mouse, multi-cursor, syntax highlighting, and plugins. If you're defaulting to nano, try micro; you'll likely stay.

Q: Should I learn Vim instead? A: If you spend hours/day editing in the terminal, yes eventually. If you're editing a config file on a server once a week, micro is a much lower tax on your attention.

Q: Does it support LSP? A: Yes via plugins (plugin install ale for linting, or dedicated LSP plugins). Less polished than Neovim/Helix LSP, but workable.

Q: Will my Ctrl+C interrupt the process or copy? A: In micro, Ctrl+C copies (like a desktop editor). Use Ctrl+E to open the command bar for commands, and Ctrl+Q to quit.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产