Command-line text editors are a testament to the usefulness of the Linux terminal, allowing you to edit files without ever needing to leave the terminal. These editors use fewer resources and are blazing fast, perfect for some quick editing.

Some of the popular command-line text editors include Vi, Vim, and Nano. These tools are so popular that they come preinstalled on most Linux distributions. However, some editors like Vi or Vim have their learning curves and key bindings which can be hard to grasp for beginners. Here's a simpler alternative: Micro Text Editor.

How Micro Fares Against Other Editors

Micro proclaims itself to be a modern and intuitive terminal-based text editor, and rightfully so. Micro's primary advantage over the likes of Vi or Vim is the simplicity. Vim is not for the faint of heart and requires you to learn all the different modes and key bindings.

Learn More: How to Use Vim: A Guide to the Basics

Although Vim is worthy of learning and mastering, it can be overwhelming for beginners. Nano is relatively simpler to use but still doesn't come close to the simplicity of Micro. Take saving a file, for example. With Nano, you need to press Ctrl/Cmd + O, which is usually a shortcut for opening a file in popular word processors like Microsoft Word. Not very intuitive!

With Micro, saving a file is as simple as pressing Ctrl/Cmd + S, a keyboard shortcut you might be accustomed to. Even if you've never used a terminal-based text editor, you'll feel right at home while using Micro. However, that's not all. It has its own set of features to enrich the user experience further.

Features of Micro Text Editor

Apart from being simple to use, Micro does not shy away from adding some useful features. Let's have a look at these in detail.

Common but Customizable Key Bindings

Keybindings in Micro Editor

By default, Micro comes with some key bindings similar to the ones found on popular word processors. But as a power user, you can customize these bindings to your heart's content and configure them just the way you want.

Complete Mouse Support

mouse support in micro text editor

One of the features that most of the command-line text editors lack is the mouse and trackpad support. With Micro, you don't have to worry about that. You can click and drag to select the text, double click to select by word, and triple-click to select by line.

Colors and Syntax Highlighting

color syntax highlighting in micro editor

Micro supports syntax highlighting for over 130 programming languages including popular ones like JavaScript, Python, C++, and more. Apart from this, you can choose your theme from the seven default color schemes available. Don't like the existing themes? You can even make your own theme to use with Micro.

Multiple Cursors

Split Panes in Micro Editor

Similar to Sublime Text's multi cursor feature, you can also edit multiple instances of the same word using Micro. Moreover, you can split the editor horizontally and vertically to view and edit more than one file at a time.

Dedicated Plugin System

Plugins for Micro Editor

To take things a step further, you can add plugins to Micro and supercharge the editor. You can view all the available plugins from the Plugins page of Micro Editor's website. It comes with six default plugins for automatically closing the brackets and quotes, linting your code, and more.

Built-In Terminal Emulator

Shell Instance in Micro

With Micro, you can run an interactive shell within the editor itself. This is especially useful when you want to split the editor into halves, with the code on one side and its output display on the shell on the other side.

How to Install Micro on Linux

Installing the Micro editor is simple and straightforward. You can choose any of the multiple installation methods depending upon the Linux distribution you're running. You can download the latest prebuilt binary for all distributions using:

        curl https://getmic.ro | bash
    

However, this method will only download the binary, and it will be accessible in only the downloaded folder. To use Micro across all folders in the terminal, you'll have to move the binary to the /usr/bin directory using this command:

        sudo mv micro /usr/bin
    

For distributions like Ubuntu that support snap packages, you can install the snap variant of Micro with the following command:

        snap install micro --classic
    

If you're not a fan of snap or curl, you can download the prebuilt DEB binary from the releases page and install it on Debian-based Linux distributions.

Learn More: How Do You Install a DEB File in Ubuntu?

Common File Operations With Micro

Now that you've installed Micro, it's time to get familiar with using it. To achieve this, you can try creating a new text file using Micro, editing it, finding a word, and saving the file once done. To start Micro, run the following command:

        micro test.txt
    
Opening a new file using Micro

This will create a new text file named test with the extension of TXT. To open an existing file instead of creating a new one, you can replace the text.txt in the command with the filename and extension.

Editing a file using Micro

On running the command, Micro will greet you with the traditional text editor interface. Since you created a new file, the contents of the file will be blank. Go ahead and add a sentence or two to get comfortable with the interface.

Using the find operation on Micro

You can undo and redo your actions using Ctrl/Cmd + Z and Ctrl/Cmd+ Y respectively, just like you would do in a word processor. For finding words, you can use the Ctrl + F shortcut.

Saving a file using Micro

Finally, you can save the text file using the Ctrl/Cmd+ S shortcut and exit Micro using Ctrl/Cmd+ Q shortcut.

Uninstalling Micro

If Micro is not what you're looking for and you don't need it anymore, you can uninstall it easily by deleting the micro executable from the /usr/bin directory.

        sudo rm /usr/bin/micro
    

However, if you used snap to install Micro, you'll have to uninstall it using this command:

        sudo snap remove micro
    

Editing on Command-Line Doesn’t Have to Be Hard Anymore

If you were putting off using command-line text editors for being daunting, Micro is here to put a stop to it. It is a wonderful tool to get comfortable with the terminal and have a more productive experience while doing so.

If you aren't ready just yet to make the leap towards the command-line for your text editing purposes and want to stick to GUI, we have a dedicated post on some incredible text editors that you can use on Linux.