Gedit is the GNOME text editor and one of those amazing little softwares that everyone tend to overlook. You must be thinking how powerful could gedit be. It is a cool lightweight text editor which offers syntax highlighting for any kind of programming/scripting language that exists. But how could you customize it to use it as an Integrated Development Environment? The answer is “Plugins”. In this article I shall cover two of the most useful plugins for a coder. For those who never knew gedit supported plugins, check out Edit > Preferences > Plugins to unleash the hidden ammunition that gedit carries with it.
The “Snippets” Plugin
What this plugin helps you insert often-used pieces of text in a fast way. For example to construct a do-while loop in C++, I just need to type in “do” and press the tab button and bam!! the plugin does the rest for me. This plugin supports a large number of snippets over a large number of Programing/Scripting languages. You can also add custom made snippets by clicking the “Configure the Plugin” button.
The “External Tools” Plugin
This plugin lets you execute external commands and shell scripts. You can just click the “Configure the Plugin” button and add commands, assign shortcuts, pass arguments and specify output file/ location. This comes very handy for a programmer. He need not fall back to the terminal every time he edits his code and compile or run it. He can just create two items in this plugin, enter the compilation/execution command, assign shortcuts and run the commands from within gedit. For example, to compile a simple C++ code I can add an item as follows
$GEDIT_CURRENT_DOCUMENT_PATH is the variable storing the file name and $GEDIT_CURRENT_DOCUMENT_DIR corresponds to the directory in which it is located. It is pretty simple to add custom compilation scripts to the plugin. On execution a bottom pane opens up and shows command outputs. Neat huh?
That qualifies gedit as a universal IDE. So do not waste time installing separate IDEs for different languages, when gedit is an all in one customizable IDE by itself.