Tired of using a Nano text editor? Then surely you have to try Micro – is a simple terminal-based text editor written in Go Language and released under MIT license.
[ You might also like: How to Create 100% CPU Load on Linux System ]
It will not be fair to say micro is a suitable replacement for VIM or Emacs since they offer much more features than what micro offers at the moment and I hope in future micro grows to the same comparable level.
Features of Micro Text Editor
- Simple to install and use.
- Supports syntax highlighting for 70+ languages.
- Custom keybindings and Built-in keybindings similar to normal text editors.
- Possible to install plugins.
- Supports Horizontal and Vertical splits.
- Supports color schemes.
- Run terminal emulator inside micro.
How to Install Micro Text Editor in Linux
There are many ways you can install Micro in your Linux distribution. I will not show all the methods but only one method that will work across all the distributions.
There is an installation script that can take care of installing micro. Run the following command which will download the script and install the latest version of the micro text editor. Move the micro binary from your current directory from where you ran the curl command to the /usr/bin/ directory.
$ curl https://getmic.ro | bash $ sudo mv micro /usr/bin/
How to Use Micro Text Editor in Linux
Simply type micro which will create an empty buffer. You can also open an existing file or create a new file you can do it in the following ways.
$ micro # Creates an empty buffer $ micro ~/.bashrc # Opening an existing file $ micro ~/newfile.txt # Creates a file named newfile.txt
Try to access help to get to know more about micro. To access help inside micro-press CTRL + G
.
If you ever used nano text editor keybindings will be displayed at the bottom. Likewise, if you need keybindings to be displayed press ALT + G
.
Micro Built-in Command Bar
Micro has a built-in command bar from which you will modify parameters, open new files, perform splits, and many more. To open the command bar press CTRL + E
. This is well documented in the help section.
Micro Keybindings
Creator of micro tried using the same set of common keys we use in popular text editors. To get the list of default keybindings open the command bar (CTRL+E
) and type the following command.
> help defaultkeys
You can also create custom keybindings in bindings.json file stored under your home directory ~/.config/micro/bindings.json.
Micro Color Scheme
Micro has a set of built-in light and dark themes. To set a theme press CTRL+E
and type the following command. You can press the tab after typing set which will popup options for you.
> set colorscheme <themename>
Micro Horizontal and Vertical Splits
Micro supports horizontal and vertical split. To open a file in either horizontal or vertical split, press CTRL+E
and type the following command.
> hsplit filename # Horizontal split > vsplit filename # Vertical split
You can press CTRL + W
to move between splits.
That’s it for this article. In this article, we tried to show you some of the important features of a micro text editor. Give micro a try and share your feedback with us.
How to activate Terminal Emulator in it? What’s the command?
Press
Ctrl+E
, then “term” (without the quotes), then Enter.