Text Editor

A text editor is one of those indispensable and very often used programs for Linux users. We can use it to view the contents of files and source code, edit configuration files, and save any important data. A text editor should be convenient in use, multi-functional, and configurable.

In this article, I will recommend two text editors. The first is a simple editor with GUI, and the second is a console program but it is more powerful. Let's start with the GUI editor.

1. Gedit

Gedit is a default editor from the GNOME desktop environment. In the KDE you can use its analog is called Kate. In other desktop environments, you can install one of both. It is the most simple and lightweight editor.

But in most cases, nothing more is needed for quick editing or viewing of text in GUI. If you need to work with text formatting, it will be better to use a robust editor from any office suite, for example, LibreOffice Writer. If you want to edit source code, you should use IDE.

Here main advantages of Gedit:

  • Lightweight. The editor supports, only the most needed features, so it's interface is clear and simple. And it can launch very fast, faster than LibreOffice or any IDE.
  • Syntax Highlighting. Even though the fact that the editor is light, it will be convenient to view configuration files and source code because it supports syntax highlighting.
  • Availability. The editor is preinstalled in most distributions that use GNOME, so you don't need to install something else.

2. Vim

In a lot of cases, a default editor is enough, for example, Gedit, as well as Notepad, was enough in Windows. But if you want to work in the terminal when you are connected to a remote server using SSH you need a console text editor. A default editor also can open big files. I recommend learning and using Vim and it's graphical interface gVim. In most articles on this site, it is assumed that you will edit files using Vim.

This editor is very hard to learn for beginners. But when you get used to it a little you will understand its power and will not regret that you took it up.

Advantages of Vim:

  • Command mode. Vim allows editing text without a mouse using a very powerful command mode.There are available not only to move the cursor over text but also selection and copy and paste. This saves a lot of time if you can type text using your ten fingers and not look at the keyboard. Many people like Vim-style text editing, so most IDE have plugins that add support for it.
  • Customizability. This text editor is very flexible for configuration. You can add your key bindings, make aliases for existing commands, write macroses, configure appearance and layout, etc.
  • Big files support. Vim can open big files and allow to edit them. Of course, you can use special editors to do this, but in most cases, Vim does it very well.

I will not describe the modes, plugins, and commands of Vim here. You can find it all in this article.

Wrapping Up

It can increase your productivity only by using the best tools. Especially for this, you have chosen Linux. Vim can help work with text faster. Don't be afraid of its difficulty. Everything new is difficult at the beginning, but you can do this.