Atom editor
Atomic Writing
Although Atom is designed for developers and coders alike, writing professionals can also benefit from this powerful text editor.
Despite a plethora of available writing tools and platforms, a text editor still remains the weapon of choice for many writing professionals. And, although text editors like Gedit, Kate, and nano are perfectly adequate for drafting articles and scribbling notes, a more powerful and extensible application like Atom [1] can prove to be an essential tool for serious writing.
Installing and Configuring Atom
The project's website provides binary packages for several platforms, including a package for 64-bit versions of Ubuntu and Red Hat. No software repositories exist, so you have to download and install all future releases manually. However, if you happen to use Ubuntu, you'll be pleased to learn that the WebUpd8 team maintains a PPA containing Atom for both 32-bit and 64-bit versions of Ubuntu. Installing Atom from this PPA can be done using the following commands:
sudo add-apt-repository ppa:webupd8team/atom sudo apt-get update && sudo apt-get install atom
The first order of business after you've installed Atom is to configure its basic settings (Figure 1). To do this, press Ctrl+<comma> (or choose Edit | Preferences). This opens the Settings interface in a separate tab. Most options in the Core Settings section are self-explanatory, so you shouldn't have problems configuring them.

Atom's configurability goes well beyond the basic options in the Settings section, though. Practically every aspect of the editor can be customized by specifying options in the dedicated ~/.atom/styles.less
stylesheet. To open it for editing, choose Edit | Open Your Stylesheet. Specifying custom options here requires a working knowledge of CSS and LESS [2], but you can learn a lot by studying styles.less
files shared by other Atom users on GitHub Gist [3]. To get started, you can change the default line spacing by specifying the following option in the styles.less
stylesheet:
.editor { line-height: 1.5 }
Like any other serious text editor, Atom supports snippets, or abbreviations, that automatically expand into predefined text. For example, you can create a snippet that replaces the fig abbreviation with Figure 1. Caption. text. To edit snippets, choose Edit | Open Your Snippets. Snippets in Atom have the following format:
'.text.plain': 'Figure': 'prefix': 'fig' 'body':'Figure 1: Caption.'
The first key defines the scope (i.e., file types where the snippet can be used). In the example above, .text.plain
indicates that the snippet can be used in all plain text files. The second key specifies the name of the snippet (in this case, it's Figure
). The prefix
key defines the abbreviation for the snippet, whereas body
contains the text fragment that replaces the abbreviation. The latter key can contain multiline text fragments, but they must be wrapped into double quotes as follows:
'body':""" fig1.png Figure 1: Caption. """
Snippets can contain placeholders, too. For example, instead of the fig1.png Figure **1: Caption.
text fragment with the hard-wired figure number, you can use the $1
placeholder: fig$1.png Figure $1: Caption.
. This way, when you expand the abbreviation, the placeholders are replaced with multiple cursors, so you can insert the desired number in one go. You can also specify multiple placeholders like $1
, $2
, $3
, and so on, which allows you to use the Tab key to move to the next placeholder position in the expanded text fragment.
Atom Basics
Although Atom is a rather powerful text editor, mastering its basics is not particularly complicated. The commands under the File menu allow you to open a single file or an entire directory. The View | Toggle Tree View command enables the Tree View pane, which shows all the files in the opened directory.
Because Atom supports tabs, you can open multiple files for editing and easily switch between them. If the directory contains a lot of files, you can quickly locate the one you need using the fuzzy search feature: Press Ctrl+T and start typing the name of the file you are looking for, and the matching results appear in the drop-down list. Then, select the desired file to open it.
Although many of Atom's features are aimed at developers, they can also be useful for general text editing. Pressing Ctrl+D selects the current word, for example, and pressing the combination again selects the next occurrence of the word. This way, you can select multiple occurrences of a specific word and replace them in a single action. Some of the other keyboard shortcuts might also come in handy. The Ctrl+L shortcut lets you select the current line, and the Ctrl+Up arrow and Ctrl+Down arrow shortcuts can be used to move the current line up and down.
Atom's bookmarking functionality can be useful when working with long texts, and the editor offers several keyboard shortcuts for managing bookmarks. The Ctrl+Shift+F2 shortcut toggles a bookmark at the current location, and the F2 and Shift+F2 shortcuts jump to the next and the previous bookmarks.
The editor features dozens, if not hundreds, of commands, and remembering them all and their keyboard shortcuts can be a daunting proposition. Fortunately, Atom comes with the Command Palette tool for quick access to all supported commands (Figure 2). Pressing Ctrl+Shift+P evokes the Command Palette, then you can start typing the name of the desired command. Selecting the command you need from the drop-down list of matching results performs the action.

Extending Atom with Packages
Thanks to its modular architecture, you can tailor Atom to your specific needs and extend the editor with the use of packages. The Packages section of the Settings interface makes it possible to install and manage packages without leaving the editor (Figure 3): Just find the desired package, and use the appropriate buttons to install and configure the package. Atom automatically checks for updates and prompts you when newer versions of installed packages are available.

The official package repository [4] contains a wealth of packages, including those useful for writing. Word Count [5] is the package you might want to install right from the start. As the name suggests, this simple package adds the word count feature that is essential for all writing professionals. The package shows a word and character count in the status bar.
If you find Atom's interface too busy for your liking, Zen package [6] is right up your alley. It turns Atom into a distraction-free environment by hiding interface elements, including the tree view, the status bar, and the tab bar (Figure 4). You can toggle Zen mode by pressing Shift+F11.

The Minimap package [7] adds another creature comfort: a sidebar containing a bird's eye view of the current document. You can use Minimap to move quickly to the desired place in the text by dragging the selection area.
The Project Manager package [8] can come in particularly useful when you work on several projects, each containing multiple files. This package makes it possible to save each session as a separate project and then quickly open projects and switch between them. Once installed, the Project Manager adds a separate entry to the Packages menu. This entry contains commands for saving the current session as a project, toggling between existing projects, and editing projects. Alternatively, you can use the Command Palette, which provides a faster and more efficient way to run the commands. Press Ctrl+Shift+P to evoke the Command Palette, type project, and select the desired command with the Project Manager prefix.
Although the Tasks package [9] won't add any writing-related functionality to Atom, it's perfect for keeping track of your tasks without leaving the editor. The package adds several commands (accessible via the Command Palette) that can apply special formatting to .todo
and .taskpaper
text files. Selecting the Tasks:Add command adds a new task, and the Tasks:Complete command marks the currently selected task as complete. You can also archive the current task using the Tasks:Archive command and mark it as canceled with the Tasks:Cancel command.
If you need to use Atom to access and edit files on a remote server, the Remote Edit package [10] is your best friend. After installing the package and adding connection profiles, you can use Atom to edit text files stored on remote hosts (Figure 5). Remote Edit features a convenient graphical interface for creating connection profiles, and the package supports the SSH and FTP protocols. Using the available commands, you can establish a connection to a remote host, find the text file you need, and open it for editing.

Dealing with PDF files usually requires a dedicated PDF viewer. However, you can peruse PDF documents without leaving the convenience of Atom, courtesy of the PDF View package [11]. Based on the excellent PDF.js library, this package lets you open PDF files directly in the editor.
If you use Git for versioning, you'll appreciate the Git History package [12]. As the name suggests, this package shows the history of the current text file and lets you open any of its previous versions (Figure 6). This functionality is rather straightforward: Evoke the Command Palette, type Git History, and select the Show File History command. From the drop-down list, pick the desired version of the file to open it side-by-side with the current text.

If you run Atom on several machines, configuring the editor and installing packages can quickly become a nuisance. Fortunately, the Sync Settings package [13] provides a solution to this problem. This package lets you store key Atom settings (basic configuration, custom keyboard binding, and a list of installed packages) as a gist on the GitHub Gist service [14]. To make use of this package, you need to sign in to GitHub and create a new personal access token with the gist scope [15]. Then, create a new gist and note its ID (the alphanumeric part of the URL after the user name).
In Atom, open the Settings interface and locate the Sync Settings package using the Filter packages field. Selecting the package opens its settings, where you can enter the gist ID and the token into the appropriate fields. You can then upload Atom settings using the Packages | Synchronize Settings | Upload command (or by using the Command Palette). To import the settings to Atom running on another machine, configure the Sync Settings package as described and use the Packages | Synchronize Settings | Download command (Figure 7).

Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
News
-
Red Hat Migrates RHEL from Xorg to Wayland
If you've been wondering when Xorg will finally be a thing of the past, wonder no more, as Red Hat has made it clear.
-
PipeWire 1.0 Officially Released
PipeWire was created to take the place of the oft-troubled PulseAudio and has finally reached the 1.0 status as a major update with plenty of improvements and the usual bug fixes.
-
Rocky Linux 9.3 Available for Download
The latest version of the RHEL alternative is now available and brings back cloud and container images for ppc64le along with plenty of new features and fixes.
-
Ubuntu Budgie Shifts How to Tackle Wayland
Ubuntu Budgie has yet to make the switch to Wayland but with a change in approaches, they're finally on track to making it happen.
-
TUXEDO's New Ultraportable Linux Workstation Released
The TUXEDO Pulse 14 blends portability with power, thanks to the AMD Ryzen 7 7840HS CPU.
-
AlmaLinux Will No Longer Be "Just Another RHEL Clone"
With the release of AlmaLinux 9.3, the distribution will be built entirely from upstream sources.
-
elementary OS 8 Has a Big Surprise in Store
When elementary OS 8 finally arrives, it will not only be based on Ubuntu 24.04 but it will also default to Wayland for better performance and security.
-
OpenELA Releases Enterprise Linux Source Code
With Red Hat restricting the source for RHEL, it was only a matter of time before those who depended on that source struck out on their own.
-
StripedFly Malware Hiding in Plain Sight as a Cryptocurrency Miner
A rather deceptive piece of malware has infected 1 million Windows and Linux hosts since 2017.
-
Experimental Wayland Support Planned for Linux Mint 21.3
As with most Linux distributions, the migration to Wayland is in full force. While some distributions have already made the move, Linux Mint has been a bit slower to do so.