Sublime Text Keyboard Shortcuts

December 31, 2021

Download

License Keys

Sublime Text 3 3126

Sublime Text 3 3143

License Key:

—– BEGIN LICENSE —–
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
9D2D2E61 67610860 6D338B72 5CF95C69
E36B85CC 84991F19 7575D828 470A92AB
—— END LICENSE ——

Reference Links:

Most Used Personal Shortcuts

Complete shortcut list is at the end of this document. This section only lists personal preferences.

Four Types of Goto:

  • Ctrl + P: File Navigation
  • Ctrl + ;: Word Navigation #
  • Ctrl + R: Function Navigation @
  • Ctrl + G: Line Number Navigation :

Editor Configuration

Configuration Path: Sublime Text → Preferences → Settings-User

Below are configurations that can be customized according to personal preference.

"always_show_minimap_viewport": true, # Always show minimap
"draw_minimap_border": true, # Make current position more visible in minimap
"highlight_modified_tabs": true, # Tabs with unsaved changes appear in orange
"ignored_packages":
[
   "Vintage"
],
"show_full_path": true, # Show full file path in title bar
"show_line_endings": true, # Show line endings at the end of document
"open_files_in_new_window": false, # Do not open files in new window when using Finder
"translate_tabs_to_spaces": true # Convert tabs to spaces

Highlight Current Line

"highlight_line": true

This setting highlights the current line under the cursor, making it easier to locate.

Auto-save on Focus Loss

"save_on_focus_lost": true

As the name suggests, the file will auto-save when focus shifts away from the current editing file. This is very useful to avoid losing unsaved changes during debugging.

Trim Trailing White Space on Save

"trim_trailing_white_space_on_save": true

This removes trailing spaces at the end of each line—spaces that are generally unnecessary. Manually deleting them can be tedious. Whether to enable this depends on your needs.

Show Current File Encoding

"show_encoding": true

This helps avoid basic encoding errors. When enabled, the current file's encoding is displayed in the bottom-right corner of the editor.

Open New Files in New Tab

"preview_on_click": false

By default, clicking a new file replaces the current tab, which is inconvenient. The setting "open_files_in_new_window": true exists by default but doesn’t fully achieve the desired effect.

To open new files in a new tab, set this parameter. After setting, you’ll need to double-click to open files.

Alternatively, try adding "preview_on_click": false, but this requires double-clicking to open files—less convenient.

Opening files in new tabs prevents overwriting previously opened files.

Reference Links:

Plugins

Install Package Control

Method 1:

First install the plugin manager: Package Control, which allows easy browsing, installation, and uninstallation of Sublime Text plugins. Steps:

(1) Open the Sublime Text console with Ctrl + \ and paste the following code:

import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())

Wait for Package Control to install.

Restart Sublime Text.

If successful, you should now see Package Settings and Package Control in the Preferences menu.

(2) Open the Command Palette with Ctrl + Shift + P, type PCI to find Package Control. This confirms successful installation.

Now you can easily install and use various Sublime Text plugins.

Method 2: (For Sublime Text 3143)

If you’re using Sublime Text 3143, Method 1 may fail. Try Method 2.

Method 2 worked on my Mac but not on my Windows.

Method 2: Offline Installation

This method should work for all Sublime Text versions.

Steps:

  • Close Sublime Text 3 and download a ZIP package from https://github.com/wbond/package_control/releases.
  • Extract the top-level folder to C:\Users\<Your Username>\AppData\Roaming\Sublime Text 3\Packages (if AppData is hidden, show hidden files or directly navigate to the path). Rename the folder (e.g., package_control-3.3.1-beta2) to Package Control.
  • Open Sublime Text 3 (it will auto-install Package Control; use Ctrl+ to check progress in the console). After installation, press Ctrl+Shift+P, type “Install” to search for Package Control.

Reference: CSDN

Issue: Unable to Install Plugins

After installing Package Control, you may encounter the following error when trying to install other plugins:

There are no packages available for installation

Solution:

Open the Package Control.sublime-settings file located at C:\Users\smyhvae\AppData\Roaming\Sublime Text 3\Packages\User\, and add the following "channels" field:

"channels":
[
	"https://wilon.github.io/static/channel_v3.json"
],

The "channels" field specifies the URL. If you find the above link slow, you can use a local channel_v3.json path (recommended):

  • Download the JSON file: from packagecontrol.io or GitHub
  • Place the downloaded file in the Sublime Text installation directory.
  • Update the "channels" field to:
"channels":
[
	"C:/Program Files/Sublime Text 3/channel_v3.json"
],

Reference Links:

Cursor Not Following in Chinese Input Method

Solution: Install the IMESupport plugin. Currently appears to support only Windows; cursor tracking in search interfaces may not be perfect.

Steps: Ctrl + Shift + P → type pci → type IMESupport → press Enter.

Chinese Character Encoding Issues

Solution: Install the ConvertToUTF8 plugin.

If using on Mac, also install Codecs33.

Markdown Writing in Sublime Text

(1) Install Themes for Syntax Highlighting

After installing Package Control, install Monokai Extended and Markdown Extended plugins.

Steps:

  • Press Shift + Command + P to open the Command Palette, type pci (fuzzy match), select Package Control: Install Package, and press Enter.
  • Install both plugins by typing their names and pressing Enter.
  • Click the document type dropdown in the bottom-right corner of Sublime, select Open all with current extension asMarkdown Extended.
  • In Preferences → Color Scheme → Monokai Extended, choose a theme (I chose Bright Theme). Result:

Reference: [Nearly Perfect Markdown Writing Experience](https://wzzlj.gitbooks.io/wzzljomooc2

Article Title: Sublime Text Keyboard Shortcuts

Author:

Published: December 31, 2021

Copyright: This article is licensed under CC BY-NC-SA 4.0 . Please keep attribution when reusing.

Related Posts

9/15/2015

Virtual Machine

A comprehensive guide to installing virtual machines on Mac using VMware Fusion and Parallels Desktop, including Ubuntu system installation, configuration optimization, and solutions for small icons and fonts in Windows 7, helping you efficiently manage your virtual environment.

12/31/2021

OmniFocus

In-depth Analysis of OmniFocus Project and Task Management Techniques on Mac, Covering Infinite-Level Projects, Folder Grouping, and Secure Sync Solutions, to Help You Efficiently Implement the GTD Methodology.

4/30/2018

Homebrew

Teach you how to install HomeBrew on Mac, easily manage UNIX tools and software, quickly set up a development environment, and improve work efficiency.

Comments