Micro - A Modern Terminal Based Text Editor with Syntax Highlighting

Channel: Editors Linux
Abstract: How to Use Micro Text Editor in Linux If you’ve installed micro using prebuilt binary package or from automated scriptAnd so much more.. How to Instal

Micro is a modern, easy-to-use and intuitive cross-platform terminal-based text editor that works on Linux, Windows and MacOS. It is written in GO programming language and designed to utilize the full capabilities of modern Linux terminals.

It is intended to replace the well known nano editor by being easy to install and use on the go. It has well aims to be pleasant to use around the clock (because you either prefer to work in the terminal, or you need to operate a remote machine over ssh).

Importantly, Micro requires no additional programs, it ships in as one single, ready-to-use, static binary (with every thing included); all you need to do is download and use it right away.

Features of Micro Terminal
  • Easy to install and use.It is highly customizable and supports a plugin system.
  • Supports common keybindings, colors and highlighting.
  • Supports automatic listing and error notifications.
  • Supports copy and paste with the system clipboard.
  • Offers several common editor features such as undo/redo, line numbers, Unicode support, softwrap.
  • Supports syntax highlighting for over 90 languages! And so much more..
How to Install Micro Text Editor in Linux

To install micro text editor, you can download a prebuilt binary for you system architecture and install.

There is also a automated script that will fetch and install latest prebuilt binary as shown.

$ mkdir -p  ~/bin
$ curl -sL https://gist.githubusercontent.com/zyedidia/d4acfcc6acf2d0d75e79004fa5feaf24/raw/a43e603e62205e1074775d756ef98c3fc77f6f8d/install_micro.sh | bash -s linux64 ~/bin

For a system-wide installation, use /usr/bin instead of ~/bin in the command above with sudo command (if your installing as non-root user).

$ sudo $ curl -sL https://gist.githubusercontent.com/zyedidia/d4acfcc6acf2d0d75e79004fa5feaf24/raw/a43e603e62205e1074775d756ef98c3fc77f6f8d/install_micro.sh | bash -s linux64 /usr/bin/

You will possibly get the 「Permission denied」 error, run the following command to move the micro binary to /usr/bin:

$ sudo mv micro-1.1.4/micro /usr/bin//micro

In case your operating system does not have a binary releases, but does run Go, you can build the package from source as shown.

Important: Ensure that you have installed Go (GoLang) 1.5 or higher (Go 1.4 will only work if your version supports CGO) on your Linux system in order to use Micro, otherwise click on the link below to follow the GoLang installation steps:

  1. Install GoLang (Go Programming Language) in Linux

After installing Go, type the following commands as a root user to install it:

# go get -d github.com/zyedidia/micro/...
# cd $GOPATH/src/github.com/zyedidia/micro
# make install
How to Use Micro Text Editor in Linux

If you’ve installed micro using prebuilt binary package or from automated script, you can simply type.

$ micro test.txt

If you installed from source, the binary will then be installed to $GOPATH/bin (or your $GOBIN), to run Micro, type:

$ $GOBIN/micro test.txt

Alternatively, include $GOBIN in your PATH to run it as any other system program.

Micro Text Editor

To exit, press Esc key, and to save text before closing, press y(yes).

Save File in Micro Editor

In the screen shot below, am testing the color and syntax highlighting features of Mirco, note that it automatically detects the syntax/file type (Shell and Go syntax in these examples below).

You can press F1 for any help.

Micro Syntax Highlighting

You can view all Micro usage options as follows:

$ micro --help
$ $GOBIN/micro --help

For more about micro editor, go the project GitHub Repository: https://github.com/zyedidia/micro

In this brief article, we showed you how to install Micro text editor in Linux. How do you find Micro in comparison to Nano and Vi? Use the feedback form below to offer us your thoughts.

Ref From: tecmint
Channels: text editors

Related articles