Learning Linux: micro text editor

December 20, 2020
The Editor Wars

Back in the dark days before the Internet. Before Word Perfect and Microsoft Word. And, yes, even before TikTok, there was a war. In this war the future of text editing hung in the balance. It was a disagreement between simplicity and complexity. A fight between open source and closed source; free and non-free; freedom and control. It was the war between vi and emacs.

And in that war there still are no victors. Vi is now open-source and included in many distributions of Linux, but emacs is still GNU and free at heart. So, let your conscious be your guide.

micro Introduction/Features

But, today we are not here to release the dogs of war and rub salt in old wounds. No, today we are here to discuss a new text editor on the block. There are newer editors around like nano, which is increasingly popular, but now we can add one more to that list: micro. Micro is a new modern and intuitive terminal-based text editor. Like emacs, it’s open-source and free. A major feature is just how easy it is to use: it’s a simple binary file with no dependencies.

It’s highly customizable, allowing easy modification with simple json files for key bindings and other options. It supports 75 different languages with coloring and highlighting, plus it has seven default color schemes. It has multi-cursor functionality like Sublime. It’s extensible with different plug-ins written in Lua and it even contains a built-in manager for them all. Some may consider it blasphemy, but it also has full mouse support. Take that, vi users. You can even split your editing screen and run an interactive shell on one side with it’s full terminal emulator. For more features, a link can be found in our show notes.

How to Install on Linux

Once again, it’s super simple to install and use. Just download the binary file from their GitHub page and run it in your terminal. Done.

$ curl https://getmic.ro | bash 

This downloads a simple script that will place micro in the current working directory.

Just use the following command to put in the right folder:

$ sudo mv micro /usr/bin
How to Install on Mac
$ brew install micro
How to Install on Windows
> choco install micro
Basic Usage

First off, to get copy and paste to work right we need to install xclip on X11 systems, such as Ubuntu. Just run…

$ sudo apt install xclip

To start a new blank buffer, just run…

$ micro

If you want to push standard input to micro, it will accept piped input:

$ ifconfig | micro

You can move around using the keyboard arrow keys or the mouse!

To see a command bar of more command keys combinations, type CTRL+E and start pressing the tab key to cycle through other commands that are available. Other key combinations are ones you’re already familiar with, such as CTRL+S to save and CTRL+Q to quit. If you want even more help, just press CTRL+E and type help. There is even a tutorial file: CTRL+E and type tutorial

I believe that once you get used to using micro it may become your new favorite text editor. It’s easy to install and you can use it across all your environments from Linux to Windows and even MacOS. Let me know what you think of it on LinkedIn or in our amazing Discord channels. 

Comments are closed.