Gedit is the default text editor in the GNOME desktop environment. It has been the default text editor on major Linux distributions for more than a decade now. The editor is indeed very simple and beautiful:
Gedit is great because:
- It supports code highlighting out-of-the-box for many programming languages.
- You can customize the color palettes used in displaying the code, as well as fonts.
- Supports brackets highlighting, regex find/replace, automatic indention.. All out-of-the-box.
- Has easily accessible and straightforward user interface.
- Works flawlessly on all Linux distributions.
But is that’s it? Is Gedit nothing more than a text viewer with support for various themes/fonts? Well, not quite right actually. You can turn Gedit into a very advanced programming text editor with very simple steps. This post will show you how.
All the magic is laid in what’s known as “Gedit Plugins”. Gedit supports external plugins since a very long time, those plugins do add extra functionality to the program.
Some of the possible plugins to install are:
- Word Completion: Complete the currently being-written word according to the occurrences of similar words in the current document.
- Translate: Simply translate the selected text into a different language you choose.
- Terminal: Show an embedded terminal in the bottom pane of Geddit.
- SyncTex: If you are using LaTex to write a scientific paper, then this plugin will allow you to synchronize between LaTex and the PDF version.
- Git: Highlight the changes done on the file since the last Git commit (You’ll see red, green and yellow bars at the beginning of each removed, added and modified lines respectively).
- Find in Files: Search for a specific text in a set of files.
- Color Picker: Quickly get a code for the color you want to use.
- Color Scheme Editor: This plugins allows you to edit the scheme of the viewed text.
- Comment: Allows you easily to comment or uncomment some blocks/lines of code you choose.
- Bookmarks: Add a bookmark on a specific location in the code so that you can navigate between them quickly.
- Snippets: Do you repeat writing a lot of text/code many times? You can save them per-language using this plugin, and insert them automatically any time you want any where.
Here’s a video we recorded for Gedit with some activated plugins. just to show you what you can do:
You simply need to install the gedit-plugins package on your Linux distribution. If you are using Ubuntu/Mint or one of their derivatives, then run the following command in the terminal:
sudo apt install gedit-plugins
If you are using Fedora, then run the following command:
sudo dnf install gedit-plugins
For other distributions, just search for the package in your software center or package manager. You may also install individual plugins if you want instead of the whole package.
After you install the package, just start Gedit, and enable the plugins you want from Preferences -> Plugins. Then follow previous video in order to see how to work with them.
As you should have seen by now, Gedit is way more than just a text viewer.
Some people prefer to use more advanced coding-ready editors like Sublime 3, Atom and others instead of using Gedit. They may also prefer using a complete IDE solution. But I don’t know, for my own use for example, I have found Gedit to be way more than enough. I don’t need all the other fancy features in those editors for my workflow.
Please take a moment to vote below on this topic, and let’s see your opinions!