Linux command
micro 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Open file
micro [file.txt]
Open at line
micro [file.txt]:[line]
Open multiple files
micro [file1.txt] [file2.txt]
Diff files
micro -diff [file1] [file2]
Read-only mode
micro -readonly [file.txt]
Show version
micro -version
说明
micro is a modern terminal text editor written in Go that aims for the ease-of-use of nano with the power of richer editors. It supports common shortcuts (`Ctrl-S`, `Ctrl-C`, `Ctrl-V`, `Ctrl-Z`), mouse selection, multiple cursors, split panes, syntax highlighting for over 130 file types, and a Lua-based plugin system. Settings are stored in `~/.config/micro/settings.json` and key bindings in `bindings.json` in the same directory. Most editor commands can also be invoked with `Ctrl-E` to open the command bar.
参数
- -clean
- Remove all configuration files (use with care).
- -config-dir _PATH_
- Override the default config directory (`~/.config/micro`).
- -options
- Print all available global options to stdout and exit.
- -debug
- Open the editor with the log buffer (`Ctrl-E logbuffer`) shown.
- -readonly
- Read-only mode.
- -plugin _CMD_ _PLUGIN..._
- Manage plugins: `install`, `remove`, `update`, `list`, `available`, `search`.
- -multiopen _GLOB_
- Open all files matching the glob pattern.
- -version
- Show version information and exit.
- --help
- Display help information.
FAQ
What is the micro command used for?
micro is a modern terminal text editor written in Go that aims for the ease-of-use of nano with the power of richer editors. It supports common shortcuts (`Ctrl-S`, `Ctrl-C`, `Ctrl-V`, `Ctrl-Z`), mouse selection, multiple cursors, split panes, syntax highlighting for over 130 file types, and a Lua-based plugin system. Settings are stored in `~/.config/micro/settings.json` and key bindings in `bindings.json` in the same directory. Most editor commands can also be invoked with `Ctrl-E` to open the command bar.
How do I run a basic micro example?
Run `micro [file.txt]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -clean do in micro?
Remove all configuration files (use with care).