Comprehensive Sublime Text Guide: Installation, Configuration, Features, and Shortcuts
This article provides a thorough Sublime Text tutorial covering its background, installation steps, environment variable setup, Package Control installation, customization of settings, themes, color schemes, editing shortcuts, navigation features, and additional tips for efficient code editing across platforms.
Abstract
The author, a senior architect, argues that Sublime Text outperforms Notepad++ and offers a complete Chinese tutorial covering installation, configuration, and advanced usage.
Prologue
Sublime Text is a cross‑platform code editor that has evolved from version 1.0 to 3.0, yet lacks a solid Chinese guide, which this article aims to fill.
Editor Choices
Among editors the author has used, Vim and Sublime Text are recommended for their cross‑platform support, extensibility, and complementary CLI/GUI workflows.
Personal Background
The author works primarily with Java and Python on Linux, occasional HTML/CSS/JS, and C# on Windows, using Sublime Text for scripting and web development.
Writing Style
Examples are drawn from real development scenarios, with many GIF demonstrations recorded via ScreenToGif.
Editor vs IDE
Editors like Sublime Text handle plain text quickly, while IDEs such as Eclipse manage language semantics and larger projects; the author uses each tool for its strengths.
Installation
Download the latest Sublime Text 3 for Windows from the official site, check "Add to explorer context menu" during setup.
Adding to PATH
Run sysdm.cpl , open Environment Variables, and add the Sublime installation folder (e.g., D:\Program Files\Sublime Text 3 ) to Path . Then the subl command works from the console.
subl file :: Open file
subl folder :: Open folder
subl . :: Open current folderPackage Control Installation
Open the console with Ctrl+` and paste the following code:
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)After installation, use Ctrl+Shift+P and type "Package Control" to access it.
Purchase
Sublime Text is a paid, closed‑source editor; a license can be bought online, though the unregistered version remains functional with occasional reminders.
Overview
The interface includes tabs, editing area, side bar, minimap, command palette, console, and status bar.
Basic Concepts
Tabs, editing area, side bar (file/folder view), minimap, command palette, console (Python REPL), and status bar are described.
Settings
Sublime uses JSON configuration files. Example:
{
"font_size": 12,
"highlight_line": true,
}Additional settings such as "auto_find_in_selection": true enable automatic selection search.
Customization
Various themes (Soda, Nexus, Flatland, Spacegray) and color schemes are available via Package Control. Example configuration:
"theme": "Nexus.sublime-theme",
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme",Editing Features
Basic editing shortcuts (e.g., Ctrl+Enter , Ctrl+Shift+Enter , Ctrl+←/→ ), selection (multi‑cursor with Ctrl+D , split/merge with Ctrl+Shift+L / Ctrl+J ), bracket navigation ( Ctrl+M , Ctrl+Shift+M ), and auto‑completion ( Tab ) are detailed.
Finding & Replacing
Fast find/replace with F3 , Shift+F3 , Alt+F3 ; standard dialogs via Ctrl+F / Ctrl+H ; regex mode toggled with Alt+R ; multi‑file search with Ctrl+Shift+F .
Jumping
Quick file navigation with Ctrl+P , symbol navigation with Ctrl+R , line navigation with Ctrl+G , and combined jumps using @symbol , #keyword , or :line .
Window & Tabs
New window ( Ctrl+Shift+N ), new tab ( Ctrl+N ), close tab/window ( Ctrl+W ), restore tab ( Ctrl+Shift+T ).
Screen Management
Full‑screen ( F11 ) and distraction‑free full‑screen ( Shift+F11 ); split screens with Alt+Shift+2 , Alt+Shift+8 , Alt+Shift+5 ; switch screens with Ctrl+Number .
Styles & Themes
Dark and light themes (Monokai Bright, Soda, Nexus, Flatland, Spacegray) can be applied via settings.
Color Schemes
Packages like colorsublime provide many schemes; installation instructions are linked.
Good Practices
Code style settings (tab size, spaces, rulers, whitespace visibility, trim trailing whitespace, ensure newline) help enforce standards.
Code Snippets
Snippets can be inserted with a name followed by Tab ; third‑party snippets are installable via Package Control.
Formatting
Manual indentation with Ctrl+[ / Ctrl+] , paste with current indent via Ctrl+Shift+V ; plugins like HTMLBeautify, AutoPEP8, and Alignment provide auto‑formatting.
Auto Completion
Basic auto‑completion works with Tab .
Bracket Handling
Jump between matching brackets with Ctrl+M , select inside brackets with Ctrl+Shift+M , and use BracketHighlighter for visual cues.
Command Line
The built‑in console is single‑line; for richer REPL use the SublimeREPL plugin.
Miscellaneous
Additional features include macros, project management, Vintage (Vim) mode, build systems, and debugging via plugins.
Shortcuts Cheat‑Sheet
A consolidated list of common shortcuts for general use, editing, selecting, find/replace, jumping, window management, screen splitting, and more is provided.
Top Architect
Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.