I found the best text editor for basic code fixing
Tags: linux, python, programming, codenewbie
Published: 2021-05-24 15:56:53

For a couple of days, I was looking for a simple terminal-based text editor for taking simple code notes or basic code fixing kinds of stuff.

As an aspiring developer, I really like the concept of coding without touching the mouse.

So I downloaded the king of CLI text editors, [Vim](https://www.vim.org/).

Now, guess what happened.

Yeah, you're right. I stuck inside vim and couldn't even quit from there.

Then, I started watching a bunch of tutorials and started reading vim's documentation.

[This tutorial](https://youtu.be/IiwGbcd8S7I) from Ben Awad helped me to get started.

But then I realized, I have to learn a lot of things only to operate vim and it's a pretty lengthy process.

At that time, I really needed a very simple text editor for doing basic stuff.

But, vim is not simple... you know :)

So, I had to come back to '[nano](https://www.nano-editor.org/)' & I was not happy enough to write codes by using 'nano'.

Suddenly, I discovered another really cool text editor called 'micro'.

It's really awesome.

It's not as advanced as vim but definitely a lot better than nano.

![micro-editor logo](https://github.com/zyedidia/micro/raw/master/assets/micro-logo.svg "micro-editor official logo")

[Micro](https://micro-editor.github.io/) is an open-source command-line text editor created by Zachary Yedidia.

# Some basic key points of Micro:
1. It's really easy to operate.
2. It has different colours and highlights.
3. It supports syntaxes for over 70+ programming languages.
4. It has mouse support.
5. Plugins & colour schemes.
6. { [Read more](https://github.com/zyedidia/micro#features) }.

The best thing for me is <u>colour schemes</u> & <u>screen split support</u>.

Here are some of the basic things for you to get started with Micro. You'll get every single thing on Micro's documentation page but still, these are the first things you can do with micro.

# Installation
Open your terminal and give `apt install curl` <- this command.

If `curl` already exists, then put `curl https://getmic.ro | bash` <- this command to download Micro.

Then give `sudo mv micro /usr/bin` this command to add micro in the environment variables.

Now, you've successfully installed micro text editor on your computer.

For opening micro with a text file, write `micro` followed by the document name (e.g. `micro mytext.md`).

# Save-Quit, Copy-Paste
Save -> `ctrl+s`.
Quit -> `ctrl+q`.
Copy -> `ctrl+c`.
Paste -> `ctrl+v`.

# Commands
You can easily interact with the editor by using built-in commands.

Type `ctrl+e` to open the command area at the bottom.

Know everything about micro command from [here](https://github.com/zyedidia/micro/blob/master/runtime/help/commands.md).

# Colour Schemes
Micro has different built-in colour schemes for the editor.

![set colorscheme micro](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yp47fvqf2bu3dy6tkmyd.png)

Open command area by typing `ctrl+e` and then inside command area, type `set colorscheme` followed by the colour scheme name (e.g. `set colorscheme bubblegum`).

My favourite one is "gotham" - [demo](https://i.imgur.com/wCyA4b9.png).

# Screen Splits
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r0redr39kbgx4am070oj.png)

You can split your screen and code into multiple files at the same time.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oqjllpof8vjiqta2d1p6.png)

Inside command area, type `hsplit` for horizontal split & `vsplit` for vertical split followed by the file name (e.g. `hsplit abc.py` & `vsplit xyz.py`).

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ri6vto8rr0hb94x5y64.png)

Learn more about Micro from the [official documentation](https://github.com/zyedidia/micro#documentation-and-help) & [GitHub repo](https://github.com/zyedidia/micro).

[Tweet this](https://ctt.ac/LP4wZ) & share it with your dev friends.