When I digged Linux, I first tried Ubuntu, and most tutorials say
nano for editing texts in terminal.
And if it’s not nano, it’s
vi. Coming from Windows, both of them surely aren’t pleasant to use. I was so used
to easily navigating the user interface with my mouse and it was ever painful I couldn’t just click and place my cursor at where I clicked in vim or nano.
I couldn’t be arsed to learn vim, so I chose the nano way. I learned to CTRL+X to exit and save, or CTRL+W to find words and characters. I always wished for something easier to use that use the CUA Bindings, but I didn’t know any easy to use, simple CLI text editor with such features at the time.
Micro solved the major problems with Vim and Nano:
- Hard to use for beginners
- Not using CUA Bindings by default
- Nano doesn’t have syntax highlighting by default
You’d argue shortcuts are just habits problem, but let’s face it, I want to easily cut and paste to and from terminal, and I honestly dislike the shortcuts nano uses.
To install Micro in Arch Linux, issue the following command, it’s a community package:
sudo pacman -S micro
To edit files, just do
micro <filename>. The shortcuts are just the same as on Windows and other GUI:
CTRL+V to copy, cut and paste content.
CTRL+S to save and
CTRL+Q to quit. If you ever need to find words and patterns, use
CTRL+F, the Find function supports regex, too.
A quick note, if you’re using Arch or Endeavour OS, you may not come with the package
xclip preinstalled. It is crucial to proper functioning of
clipboard manipulation in micro. Install it with
sudo pacman -S xclip, restart micro and it should work flawlessly with KDE or other DE’s clipboard managers.