Micro: A Modern Terminal Text Editor For Linux
There are a plethora of text editors available for use on Linux systems, from the powerful and complex Vim through to the simpler nano. Most distributions provide both of the aforementioned editors as standard to cater for both experienced and new users alike. Unfortunately, for someone completely new to the Linux command line, both of these editors can be quite confusing.
Vim’s multi-mode editing system can appear very strange, and I’ve seen many a newbie thoroughly frustrated simply trying to exit the application. Nano, on the other hand, is simple to use with a handy row of keyboard shortcuts shown to the user. Unfortunately the choice of shortcuts can be confusing for anyone who started computing in the last two decades where keyboard shortcuts had mostly been standardized across systems.
Welcome Micro
Into this arena steps Micro. This is a new text editor that has been designed to be used as a replacement of Nano, providing a simple interface with the power of extensibility. The main screen gives the majority of the display space to the document being edited, with a small two-line status screen at the bottom. The status screen informs you of the file you have open, and the key combination to access the help which can show you through the rest of the application. A real boon for beginners is that it uses the modern standard keyboard shortcuts for copy/paste/undo/etc which massively simplifies the learning process.
Other helpful features are syntax highlighting of files for a number of programming languages and config file formats, making them easier to read and work on. Micro provides the ability to integrate with the global clipboard of your system, allowing data to be copied and pasted from multiple systems. Multiple files can be opened simultaneously, making use of split-screens or tabs similar to desktop GUI editors. The whole thing can also be extended through plugins to provide extra functionality. For example, there’s a plugin to allow the use of snippets in Micro to provide better functionality for programmers using the tool, or a plugin to support various version control systems.
Installing Micro
If you fancy trying out Micro, you can download a prebuilt binary from the project’s Github page: http://github.com/zyedidia/micro. At the time of writing the following commands would get you the latest stable release:
wget http://github.com/zyedidia/micro/releases/download/v1.3.2/micro-1.3.2-linux64.tar.gz
tar -zxvf micro-1.3.2-linux64.tar.gz
If you are running a 32bit Linux on an older system, then you will need this version:
wget http://github.com/zyedidia/micro/releases/download/v1.3.2/micro-1.3.2-linux32.tar.gz
tar -zxvf micro-1.3.2-linux32.tar.gz
Once installed, you can move the Micro binary to a location on your path to make it easy to use:
cd micro-1.3.2
sudo mv micro /usr/bin/micro
After this, Micro can be used the same as any other text editing tool, by providing a filename after the command to open or piping the output from a command to the editor:
micro test.txt
ifconfig | micro
If you wish to use Micro with your system clipboard to copy and paste between applications, then you’ll need to install the xclip application to help. Without xclip installed copy and pasting can only be done within Micro itself.
On Debian and Ubuntu systems, xclip can be installed with:
sudo apt-get update
sudo apt-get install xclip
On CentOS/Red Hat systems you can install xclip with:
sudo yum install xclip
While power users who are used to working on systems with tools such as Vim and Emacs are unlikely to be interested in Micro, it could be just the tool you require if you are a complete beginner or someone who is looking for something to provide a little bit more power than Nano.