Skip to content

10 Improvements to Gedit’s Effectiveness as a Code Editor

GNOME may have ditched Gedit as the default text editor, but it’s still loved by longtime Linux users.

It’s primarily a text editor, but with a few tweaks it can work as a lightweight code editor.

Yes, there is no need to use VS Code or other specialized code editors to write Bash scripts or simple programs in other languages ​​anymore when Gedit is available.

1. Install plugins

Few people don’t even know that Gedit has a plugin installation feature. You can install plugins to get more features.

There are two types of plugins:

  • Official Gedit plugins that are available from the editor menu.
  • Third party plugins that can be downloaded from the project websites and placed in the plugins directory (described below).

Gedit plugins can be located in /usr/share/gedit/plugins or ~/.local/share/gedit/plugins.

plugin install gedit plugin saved to the directory - 10 Improvements to Gedit's Effectiveness as a Code Editor

Available and installed plugins can be accessed by clicking on the Hamburger menu and then opening the Preference window,

access preferences - 10 Improvements to Gedit's Effectiveness as a Code Editor

In the Options window there is a Plugins tab where you can see all the plugins available to you. You can use checkboxes to enable and disable plugins.

plugin install plugins in prefereneces - 10 Improvements to Gedit's Effectiveness as a Code Editor

2. Show file browser in sidebar

If you’re working on a project that has multiple files and folders, it’s very useful to have the File Browser display all available files in the sidebar.

Go to Settings -> Plugins and enable the file browser panel.

file browser file browser plugin in preferences - 10 Improvements to Gedit's Effectiveness as a Code Editor

After that, click on the menu in the upper right corner and turn on the sidebar view in the menu View -> Sidebar.

Now change the sidebar view to File Browser if it hasn’t already been done.

file browser file browser as a side pane - 10 Improvements to Gedit's Effectiveness as a Code Editor

3. Embed terminal

Yes! You can embed a terminal directly into the Gedit text editor.

What’s the point? Well, if you write programs or scripts, the built-in terminal will help you run the script and check the changes in the code right in the editor.

terminal gedit embedded terminal - 10 Improvements to Gedit's Effectiveness as a Code Editor

To get this, first install the plugin (for Ubuntu):

sudo apt install gedit-plugin-terminal

After installing the plugin, enable it in the Settings->Plugin menu.

terminal embedded terminal plugin in plugins tab - 10 Improvements to Gedit's Effectiveness as a Code Editor

Enable Bottom Bar from Menu -> View -> Bottom Bar

terminal enable bottom panel for embedded terminal - 10 Improvements to Gedit's Effectiveness as a Code Editor

4. Markdown Preview

There are several Markdown editors available for Linux, but you don’t have to install another application to use Markdown.

With a plugin, unsurprisingly called Gedit Markdown PreviewGedit does a great job of displaying Markdown code.

Arch users can find it in the AUR as the gedit-plugin-markdown_preview package.

Other Linux users can find installation instructions at project web page.

Once installed, enable it in plugins. You must enable the sidebar view from the menu –> View > Sidebar

enable side panel - 10 Improvements to Gedit's Effectiveness as a Code Editor

This causes the Markdown text rendering to appear in the sidebar or bottom bar.

markdown preview markdown preview - 10 Improvements to Gedit's Effectiveness as a Code Editor

5. Create snippets

Good encoders encode. The best coders reuse them.

If you often use the same piece of code or text, you can save it as a snippet and paste it when needed. This will save you time (and frustration).

First enable the Snippet plugin.

enable snippet pluglin - 10 Improvements to Gedit's Effectiveness as a Code Editor

You can now access snippets from the menu -> Manage Snippets

access manage snippet - 10 Improvements to Gedit's Effectiveness as a Code Editor

You will find that it has already added several snippets for various programming languages.

snippet pre created snippets in gedit showing cpp main snippet - 10 Improvements to Gedit's Effectiveness as a Code Editor

You can also add your snippets to the desired folder by clicking on the + sign at the bottom left. You can also assign a shortcut key to snippets to paste them even faster.

adding a custom markdown table snippet - 10 Improvements to Gedit's Effectiveness as a Code Editor

6. Fix the dark mode issue

Coders love dark mode. Gedit sticks to the system theme, and if you switch to dark mode at the OS level, it also switches to dark mode.

The main problem is that you can’t read anything on the currently selected line because both the text and the line selection are colored white.

dark mode issue text not visible in highlight line - 10 Improvements to Gedit's Effectiveness as a Code Editor

It’s impossible to fix this. However, as a workaround, you can either disable highlighting of the current line or use a different color scheme. I prefer to choose a different color scheme.

Go to Options -> Font & Colors and choose a dark color scheme like Oblivion. This will change the color scheme a bit, but at least you will be able to see the text on the highlighted lines.

dark mode issue settting a new clor scheme to the dark mode font issue - 10 Improvements to Gedit's Effectiveness as a Code Editor

7. Quick selection of selected text

Double-click on a word and Gedit will highlight all occurrences of that word throughout the document.

quick highlight result - 10 Improvements to Gedit's Effectiveness as a Code Editor

This feature is not enabled by default, although there is an official plugin.

Go to Settings -> Plugins and enable the Quick Selection option.

quick highlight already available plugin no external needed - 10 Improvements to Gedit's Effectiveness as a Code Editor

8. Show Line Numbers

Many code editors show line numbers by default. This helps you quickly jump to the right line when you see “syntax error on line X”.

You can enable the display of line numbers by going to Options -> View -> Show line numbers:

line number display line numbers in gedit - 10 Improvements to Gedit's Effectiveness as a Code Editor

You can also turn it on or off from below.

show line numbers - 10 Improvements to Gedit's Effectiveness as a Code Editor

9. Save Version

If you’re modifying a file, perhaps it’s best to create a backup? Gedit can do this automatically.

Enable this feature in Settings -> Editor -> Back Up.

save backup - 10 Improvements to Gedit's Effectiveness as a Code Editor

A backup file will appear with the name of the original file appended with ~.

version in file manager - 10 Improvements to Gedit's Effectiveness as a Code Editor

10. Autosave files

While we’re on the topic of versions and backups, how about turning on autosave in Gedit? Thus, if you are working on a document and forget to manually save it with Ctrl+S, the changes will be saved automatically.

Note. This feature does NOT work on a brand new document that has never been saved to disk.

In the menu Options -> Editor you can enable the autosave feature. By default, autosave occurs every 10 minutes, but you can change the duration to your liking.

auto save files the built in save function that saves the document after some time 1 - 10 Improvements to Gedit's Effectiveness as a Code Editor

There is also a third-party smart-auto-save extension that automatically saves a document as soon as you stop typing it.

auto save smart auto save - 10 Improvements to Gedit's Effectiveness as a Code Editor

2722400cookie-check10 performance improvements for Gedit as a code editorno

Инструкции,Программы,Gedit,gnome,linux

#Improvements #Gedits #Effectiveness #Code #Editor

❤ XOXO ❤

Leave a Reply

Your email address will not be published. Required fields are marked *