Sublime Text
The Toolbox section introduced VS Code as the primary editor for this setup. Sublime Text earns its place alongside it for different reasons. It starts instantly, handles very large files without complaint, uses considerably less memory than VS Code, and is particularly good for quick edits where opening a full IDE feels disproportionate. The two tools complement each other rather than compete.
Sublime Text 4 is the current version. It is proprietary software with a perpetual licence: it can be evaluated indefinitely without purchase, with occasional nag prompts to buy. A licence is around $99 and covers all future updates within version 4.
Installation
Sublime Text maintains an apt repository. Add it using the current signed-by approach:
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | \
gpg --dearmor | \
sudo tee /usr/share/keyrings/sublimehq-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/sublimehq-archive-keyring.gpg] \
https://download.sublimetext.com/ apt/stable/" | \
sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt install sublime-text
The repository key and list file should be added to the 3rd-party repositories page as well.
Verify the installation:
subl --version
Package Control
Package Control is the package manager for Sublime Text. It is not bundled with the editor but installs in one step.
Open Sublime Text. Go to Tools > Install Package Control. Sublime Text will download and install Package Control, then restart itself.
Once installed, access it via the Command Palette (Ctrl+Shift+P). Type Package Control: to see all available commands. Package Control: Install Package opens a searchable list of available packages.
Preferences
Sublime Text’s preferences are JSON files. Open the user preferences via Preferences > Settings. The right-hand pane is the user file that overrides the defaults on the left.
A sensible starting configuration:
{
"font_face": "JetBrains Mono",
"font_size": 12,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"ensure_newline_at_eof_on_save": true,
"rulers": [80, 120],
"word_wrap": false,
"highlight_line": true,
"highlight_modified_tabs": true,
"show_encoding": true,
"show_line_endings": true,
"default_line_ending": "unix",
"atomic_save": true,
"hot_exit": "disabled",
"remember_open_files": false,
"update_check": false
}
hot_exit: disabled means Sublime Text prompts to save unsaved files on close rather than silently retaining them. update_check: false disables the automatic update check since updates come through the apt repository. JetBrains Mono was installed in the fonts section of the Toolbox page.
Packages worth installing
For this setup, the relevant packages are focused on the languages and formats used throughout the series: shell scripts, YAML, nginx config, Python, and INI files. Install each via the Command Palette > Package Control: Install Package.
EditorConfig
EditorConfig
Reads .editorconfig files from project roots and applies consistent indentation, line endings, and encoding settings across editors. If you work on projects with other people, this ensures your Sublime Text produces files that match the project conventions without manual configuration.
SublimeLinter
SublimeLinter
The linting framework for Sublime Text. By itself it does nothing: it provides the infrastructure that language-specific linter plugins use to display errors inline.
SublimeLinter-shellcheck
SublimeLinter-shellcheck
Shell script linting via shellcheck, installed in the toolbox page. Highlights errors and style issues in bash scripts as you type. Requires shellcheck to be installed:
sudo apt install shellcheck
Pretty YAML
Pretty YAML
YAML formatting and validation. Useful for borgmatic configuration, Ansible playbooks, and any other YAML files edited in Sublime Text.
Nginx
nginx
Syntax highlighting for nginx configuration files. Covers the server blocks, location directives, and upstream configurations used in the server section of this series.
TOML
TOML
Syntax highlighting for TOML files. Used by various Rust tools and configuration files.
INI
INI
Syntax highlighting for INI and configuration files: WireGuard configs, systemd unit files, and similar.
DocBlockr
DocBlockr
Helps write documentation comments in Python, JavaScript, and other languages. Pressing Enter after /** or """ creates a formatted docstring template.
Terminus
Terminus
A terminal emulator embedded in Sublime Text. Useful for running commands without switching to a separate terminal window. Supports multiple sessions and integrates with the build system.
Key bindings worth knowing
A few non-obvious Sublime Text keyboard shortcuts that are particularly useful:
| Shortcut | Action |
|---|---|
Ctrl+P | Go to file (fuzzy search across project) |
Ctrl+Shift+P | Command Palette |
Ctrl+R | Go to symbol (function, class, heading) |
Ctrl+G | Go to line number |
Ctrl+D | Select next occurrence of current selection |
Ctrl+L | Select current line |
Ctrl+Shift+D | Duplicate current line |
Ctrl+K, Ctrl+U | Convert to uppercase |
Ctrl+K, Ctrl+L | Convert to lowercase |
Alt+F3 | Select all occurrences of current selection |
Ctrl+Shift+F | Find in files across project |
The multiple cursor support is Sublime Text’s most distinctive feature. Ctrl+D to select successive occurrences, or Alt+F3 to select all at once, then type to replace all simultaneously.
Project files
Sublime Text projects save the open folders, file exclusions, and project-specific settings in a .sublime-project file. For each infrastructure project in this series, create a project file:
# Create a project for the Roll Your Own Network documentation
mkdir -p ~/Projects/ryonet
cd ~/Projects/ryonet
subl --project ryonet.sublime-project .
Add build-specific settings to the project file, such as excluding directories from the sidebar that are not relevant:
{
"folders": [
{
"path": ".",
"folder_exclude_patterns": [
".git",
"__pycache__",
"*.egg-info"
],
"file_exclude_patterns": [
"*.pyc",
"*.pyo"
]
}
],
"settings": {
"tab_size": 4,
"translate_tabs_to_spaces": true
}
}
Opening files from the terminal
The subl command opens files and directories in Sublime Text from the terminal:
# Open a file
subl /etc/wireguard/home.conf
# Open a directory as a project
subl ~/Projects/ryonet
# Open a file at a specific line
subl /etc/nginx/nginx.conf:42
# Pipe stdin into a new buffer
cat /var/log/syslog | subl
The pipe to subl is particularly useful for reviewing long command output without scrolling a terminal, or for copying text from a log file with syntax highlighting.
Comparison with VS Code
Both editors are worth having. The practical distinction:
Use Sublime Text for: quick edits to single files, large log files or CSVs that would slow VS Code, opening remote files via SFTP (with the SFTP package), or any situation where you want an editor open in under a second.
Use VS Code for: project-level work, debugging, the Remote SSH extension for editing files on servers, integrated terminal work, and anything involving the broader extension ecosystem.
Sublime Text’s licence model means you can run it indefinitely in evaluation mode. If you use it daily, the one-time licence fee is reasonable and supports continued development. It covers all future updates within the major version.