As a Linux user, there’s a non-zero chance that a text editor is your favorite app — even if you aren’t a developer.
I’m a writer, and I love using gedit to write notes and articles in Markdown. Whether you’re tweaking TXT files to change part of your interface, banging out code, or writing scripts and setting up cron jobs, there’s ample reason Linux has given you a new appreciation for text editors.
Unlike word processors, text editors don’t let you tinker with text all that much. As a result, you may mistakenly believe that what you see is all you get. Not so. You can theme your text editor, changing the colors used for the background and special syntax. Doing so may provide the boost you need to write faster and increase how long you’re able to work.
Why Use Custom Themes?
Text editors don’t allow you to format documents the way word processors do. All files are plain text, so elements like colors and bolding are not possible.
However, most Linux text editors can display keywords, boolean, and strings in different colors. These colors are not saved to the document itself, but are applied when the editor recognizes certain characters or phrases. How things appear depend on which theme you’re using.
These highlights help programmers and developers keep track of what’s going on and reduces the likelihood of errors. In Markdown, colors highlight headings and links. You can learn the default colors your text editor provides, but you may remember them more if you designate the colors yourself.
I’ve used themes to select colors that feel easier on my eyes. For me, neither white on black nor black on white provide the ideal contrast for writing. I also find colors that conflict with the rest of my desktop to be very distracting. I like dark grays on light grays, like pencil on parchment.
Whether you’re creating an environment you’re able to write in longer or tweaking colors to improve your efficiency, custom themes can be a valuable tool in your toolbox.
Where to Find Custom Themes?
Gedit, the default GNOME text editor, uses a backend called GtkSourceView to display text. Other applications that use this backend also share the same themes. An example of where to look would be /usr/share/gnome/gtksourceview-3.0/styles/ or ~/.local/share/gtksourceview-3.0/styles/. These locations may change depending on your distro or which version of GtkSourceView your text editor uses.
The project hosts a few themes on its own website. There are light and dark options to pick from, as well as some emulating other text editors. Below I’ve taken a screenshot of a theme called Turbo. There are themes emulating Dreamweaver, Emacs, and Visual Studio.
Importing a theme in gedit is remarkably straightforward. Go to Preferences > Font & Colors and click on the +. In addition to the colors, you can tweak the font. This way you can give gedit a font that you can consider ideal for writing or coding but do not want to see in other documents.
The Scratch app inside of Elementary OS uses the same technology. Its default theme, Solarized Light, is one of the default options in Gedit.
Xfce’s Mousepad editor uses an older version of GtkSourceView, so there may be some differences. But the same themes are compatible.
Popular cross platform text editors tend to have their own way of doing things. Atom is based on Chromium, so installing new themes is as simple as it is in Chrome. You can customize most aspects of Sublime Text using JSON files.
Making Your Own Theme
I created my own theme using the Scribes Theme Generator, which lets you select different colors for the background and each type of text. There’s no download required. Just head over to the website and immediately get to work. When you’re done, the site will generate an XML file that you can import into a compatible text editor. Gedit happens to be one.
KDE users may not be surprised to know that their default text editor, whether Kate or KWrite, does not use GtkSourceView. As a result, the above themes are not compatible. New themes aren’t as easy to find, but store.kde.org would be the place to check.
On the other hand, you don’t need a third-party tool to create your own look. Going to Settings > Configure Editor > Fonts & Colors lets you tweak everything inside the app. For instance, you can change the font, or select specific colors for every aspect of the text file. When you’re done, you can export your creations to share with others, or transfer to another computer.
Do You Use Custom Themes?
We all have different preferences when it comes to our work environments. Most text editors default to black on white, but many people feel eye strain staring at such a bright background for an extended period of time. Though personally, I don’t like working in a black background for anything other than terminal commands. Call it conditioning.
As simple as tweaking a few colors may be, I’m grateful to have the option. I don’t need much from my computer, but I do spend a great deal of time inside a text editor. It helps being able to tweak the colors to something that works better for me.
What about you? What are your preferences? Do you prefer light themes or dark? Vibrant colors or black and white? Either way, you’re welcome to leave your thoughts below.
Image Credits: mangpor2004/Shutterstock