LinuxCommandLibrary

micro

Edit text files in the terminal

TLDR

Open a file

$ micro [path/to/file]
copy

Save a file
$ <Ctrl s>
copy

Cut the entire line
$ <Ctrl k>
copy

Search for a pattern in the file (press / to go to next/previous match)
$ <Ctrl f>[pattern]<Enter>
copy

Execute a command
$ <Ctrl e>[command]<Enter>
copy

Perform a substitution in the whole file
$ <Ctrl e>replaceall "[pattern]" "[replacement]"<Enter>
copy

Quit
$ <Ctrl q>
copy

SYNOPSIS

micro [options] [filename...]

PARAMETERS

-version
    Prints the version number and exits.

-debug
    Enables debug mode, providing more verbose output.

-config-dir


    Specifies an alternative configuration directory.

-plugin-path
    Specifies an alternative plugin path.

-backup
    Forces the editor to create backup files

[filename...]
    Opens the specified files in the editor. Multiple files can be opened simultaneously.

DESCRIPTION

Micro is a terminal-based text editor intended to be easy to use and intuitive, while also taking advantage of the full capabilities of modern terminals. It aims to be beginner-friendly without sacrificing power. Micro is written in Go and distributed as a single, static binary, making it easy to install and deploy. It offers features such as syntax highlighting, true color support, plugin system, a mouse support, and an easy way to save files. The editor offers features expected of a modern text editor, such as undo/redo, autocompletion, and a powerful plugin system for extending its functionality further.
Micro is designed to be a more user-friendly alternative to traditional terminal editors like Vim or Nano.

CAVEATS

Micro requires a relatively modern terminal with support for features like true color to function optimally. Some advanced features may rely on specific terminal capabilities.

KEYBINDINGS

Micro uses intuitive keybindings. For example Ctrl-s to save and Ctrl-q to quit. Keybindings can be customized in config file.

PLUGINS

Micro has a plugin system. Plugins can be created using Lua. There are plugins to enhance text editing functionality, such as snippets or language support.

HISTORY

Micro was created by Zachary Yedidia as a modern alternative to existing terminal-based text editors. Development began in 2016 with the goal of providing a user-friendly experience without compromising on functionality. It gained popularity for its ease of use and its focus on modern terminal features.

SEE ALSO

nano(1), vim(1), emacs(1)

Copied to clipboard