Fundamentals 23 min read

Comprehensive Guide to Using Sublime Text: Installation, Configuration, and Productivity Tips

This article provides a thorough, step‑by‑step tutorial on Sublime Text covering its installation on Windows, adding it to the system PATH, installing Package Control, configuring settings and themes, mastering editing shortcuts, multi‑selection, find/replace, navigation, and other advanced features to boost developer productivity.

Top Architect
Top Architect
Top Architect
Comprehensive Guide to Using Sublime Text: Installation, Configuration, and Productivity Tips

Abstract

This guide systematically introduces Sublime Text, aiming to become the most complete Chinese tutorial for this cross‑platform code editor.

Prologue

Sublime Text has evolved from version 1.0 to 3.0 and is now a preferred GUI editor on many platforms, yet a reliable Chinese tutorial was lacking.

Editor Choices

Among editors I have used (EditPlus, UltraEdit, Notepad++, Vim, TextMate, Sublime Text), I recommend Vim and Sublime Text for their cross‑platform support, extensibility, and complementary CLI/GUI workflows.

Personal Background

I work mainly on Linux with Java and Python, occasionally write HTML/CSS/JavaScript, and develop C# applications on Windows, giving a realistic usage scenario for the examples.

Installation

Download the latest Sublime Text 3 from the official website; during installation, enable "Add to explorer context menu" for quick file opening.

Adding Sublime Text to PATH

Run sysdm.cpl to open System Properties, then add the installation directory (e.g., D:\Program Files\Sublime Text 3 ) to the Path environment variable. After this, the subl command can open files or folders:

subl file    :: open a file
subl folder  :: open a folder
subl .       :: open the current folder

Installing Package Control

Open the console with Ctrl+` and paste the following Python code to install Package Control:

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, press Ctrl+Shift+P and type "PC" to access Package Control.

Purchase

Sublime Text is a paid closed‑source software; you can purchase it from the official site, though the unregistered version remains functional with occasional reminders.

Overview

The UI consists of tabs, editing area, side bar, minimap, command palette, console, and status bar.

Settings

Sublime Text uses JSON configuration files. Example settings to adjust font size, highlight current line, etc.:

{
  "font_size": 12,
  "highlight_line": true
}

Additional user settings include font face, caret style, tab size, whitespace drawing, and more.

Editing

Key editing shortcuts: Ctrl+Enter adds a line below, Ctrl+Shift+Enter adds above, Ctrl+←/→ move by word, Ctrl+Shift+←/→ select by word, Ctrl+↑/↓ scroll view, Ctrl+Shift+↑/↓ move line.

Selection

Multi‑selection with Ctrl+D , skip with Ctrl+K , undo with Ctrl+U , split selections with Ctrl+Shift+L , and join lines with Ctrl+J .

Find & Replace

Three modes: quick find/replace (use F3 , Shift+F3 , Alt+F3 ), standard find/replace ( Ctrl+F , Ctrl+H ), and multi‑file search/replace ( Ctrl+Shift+F ). Regex mode toggles with Alt+R .

Jumping

Navigate quickly: Ctrl+P for "Go To Anything" (files, symbols @symbol , keywords #keyword , line numbers :12 ), Ctrl+R for symbols, Ctrl+G for line numbers, F12 to go to definition.

Window & Tabs

New window: Ctrl+Shift+N ; new tab: Ctrl+N ; close tab/window: Ctrl+W ; restore tab: Ctrl+Shift+T . Split screens with Alt+Shift+2/8/5 and switch screens with Ctrl+1…9 .

Full Screen

Toggle normal full screen with F11 and distraction‑free mode with Shift+F11 .

Style & Themes

Choose from many third‑party themes (e.g., Soda Light/Dark, Nexus, Flatland) and color schemes via Package Control . Example configuration:

{
  "theme": "Nexus.sublime-theme",
  "color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme"
}

Good Practices

Set coding standards: tab size 2, translate tabs to spaces, rulers at 80/100, draw whitespace, trim trailing whitespace on save, ensure newline at EOF.

Code Snippets

Use built‑in snippets or install third‑party ones via Package Control; trigger with snippet name followed by Tab .

Formatting

Manual formatting shortcuts: Ctrl+[ / Ctrl+] for indent/outdent, Ctrl+Shift+V to paste with current indentation. Plugins like HTMLBeautify, AutoPEP8, and Alignment provide auto‑formatting.

Auto Completion

Basic auto‑completion is available via Tab .

Brackets

Jump between matching brackets with Ctrl+M , select inside brackets with Ctrl+Shift+M , and use BracketHighlighter for visual aid.

Command Line

Use SublimeREPL for an interactive console supporting multi‑line input.

Miscellaneous

Additional features include macros, project management, Vintage (Vim) mode, build systems, and debugging via plugins.

Shortcuts Cheatsheet

Comprehensive list of general, editing, selection, find/replace, jumping, window, and screen shortcuts is provided for quick reference.

configurationProductivitycode editordevelopment toolsshortcutssublime-text
Top Architect
Written by

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.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.