Original address: http://www.cnblogs.com/zhcncn/p/4113589.html
This article is sublime Text full guide by Lucida (http://www.cnblogs.com/figure9/p/sublime-text-complete-guide.html) notes, and added some of their own organized content , thanks to the original author.
1. Download
Can be downloaded from official website HTTP://WWW.SUBLIMETEXT.COM/3.
2. Install under Windows and use 2.1 installation
1. Win7 64-bit system, you can download the Windows * bit to install.
2. When installing, be careful to check the Add to Explorer context menuso that sublime text can be added to the right button, and when you right-click the file, you can open it directly using sublime text.
2.2 Installing the plug-in 2.2.1 package Control
1. Sublime text can use the package Control to make it easier to browse, install, and uninstall plugins.
2. How do I install the package control?
You can refer to the installation steps provided on the Package control website
(1) using [Ctrl + '] (or View > Show Console menu) to open the sublime text console, paste the following Python code into the console:
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://packagecontrol.io/' + 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.pat H.join (IPP, PF), ' WB '). Write (by)
This code creates the installed Packages folder for your (if necessary), and then downloads the packagecontrol.sublime -packageinto it.
Note: The above code will change depending on the version, so it is best to take the official "1" to copy the code.
(2) If not installed automatically, the official website "1" also provides a manual (Manual) installation method, specific practices can go to the official website reference
(3) If you see the package control item in Perferences->package settings, the installation is successful.
2.2.2 How to install plug-ins with the package control
1. Press Ctrl+shift+p to bring up the command panel.
2. Enter install to bring up the Install Package option and enter.
3. Select the plugin to install in the list, or enter the plug-in name (for example, to install the Imesupport plugin, enter Imesupport, it will filter the results in real time), according to the filter results in the command panel, choose the plug-in to install.
2.2.3 using the package control to view installed plugins
If you want to see what plug-ins are already installed in Sublime Text 3, you can do so in the following ways.
1. Press Ctrl+shift+p to bring up the command panel
2. Enter "Package" in the drop-down list to find "package control:list packages", select and enter, all the plug-ins will be displayed.
2.2.4 The path of the package control installation Plugin
So where are the plugins that were installed using the package control?
It is not placed under the ST3 installation path (e.g. I am installed in the Packages directory under the E disk: E:\Program files\sublime Text 3\packages). Open the C:\Users\ user name \appdata\roaming\sublime Text 3 directory, you can see there are 2 folders: Installed Packages and Packages. Only a single file (plug-in name. Sublime-package) plug-in, is placed in the installed packages directory, contains multiple files of the installation package plug-in (such as Converttoutf8,imesupport), was placed in the packages The directory.
When you download and install the plugin manually, you can place it in the corresponding directory depending on whether the plugin is a file or an installation package.
2.3 Shortcut keys
Mainly according to reference "2" in the content of the collation, thanks to the original author.
1. Settings
- Ctrl + `: Open the Sublime text console
- Ctrl + K, Ctrl + B: key combination, Show or hide Sidebar
F11: Toggle Normal Fullscreen
Shift + F11: Toggle no interference fullscreen
2. Editing
Ctrl + Enter: Add a row below the current line and jump to that row
Ctrl + Shift + Enter: Adds a row above the current row and jumps to that row
Ctrl + ← / →: To move word by phrase,
Ctrl + Shift + ← / →: Make word-wise selection
Ctrl + ↑ / ↓: Move the current display area (just show the window changes, the file will not be modified)
Ctrl + Shift + ↑ / ↓: Move the current line (the file will be modified)
3. Select
Ctrl + D: Select the word where the current cursor is located and highlight all occurrences of the word, and Ctrl + D, select the next position where the word appears.
Ctrl + K: During multiple word selection, the currently selected word To skip
Ctrl + U: For fallback,
Esc: Exit multiple edits
Ctrl + Shift + L: Break the currently selected area and edit it at the same time
Ctrl + J: Merge the current selection into one row
4. Find
ToShift + ← / → search for keywords that are used orCtrl + D or mouseselected:
F3: Jump to keyword next occurrence position
Shift + F3: Jump to a location on a keyword
Alt + F3: Select all locations where the keyword appears (can be quickly replaced later)
Ctrl + F: Bring up the search box
Enter: Jump to the next position of the keyword
Shift + Enter: Jump to a location on a keyword
Alt + Enter: Select all the locations where the keywords appear (again, you can quickly replace them)
Ctrl + H: To replace
Ctrl + Shift + H: Replace current keyword after entering replacement
Ctrl + Alt + Enter: After entering the replacement, Replace all matched keywords. (Note: Notice that if the mouse focus is in the edit window, the replacement fails, the mouse focus is in the Replace box, Ctrl + Alt + ENTER does not work)
Ctrl + Shift + F: Turn on multi-file search & Replace
Alt + C: Toggle Case Sensitive (case-sensitive) mode
Alt + W: Toggle Whole Word matching (Whole matching) mode
Alt + R: Toggle regular Match mode on / off
5. Jump
Ctrl + P:
List the currently open file (or the file in the current folder), enter a file name, and then Enter jump to the file
Combo Jump ("Go to Anything"): Ctrl + Pafter matching to a file, we can make subsequent input to jump to a more precise position
@Symbol Jump: Enter @ symbolsymbolthe location where the symbol is located
#Keyword Jump: Enter # keywordthe location to jump tokeyword
: Line number jump: input: 12jump to the 12th line of the file
Ctrl + R:
Lists the symbols in the current file (such as the class name and function name, but cannot drill down to the variable name), and Enter you can jump to that place by entering the symbol name.
Outline of the markdown file is listed
F12: Quickly jumps to the definition of the symbol where the current cursor is located (jump to definition). For example, where the current cursor is a function call, F12 jumps to the definition of the function.
Ctrl + G: Enter line number to jump to the specified line
6. Window and tab page
Ctrl + N: Create a new label in the current window
Ctrl + Shift + N: Create a new window (this shortcut and Sogou Input Method shortcut key conflict)
Ctrl + W: Close the tab, if there is no tab, close the window
Ctrl + Shift + T: Restore the label just closed.
7. Split screen
Alt + Shift + 2: The left and right split screen
Alt + Shift + 8To split the screen up and down
Alt + Shift + 5Next to the left and right split screen (divided into four screens)
Ctrl + number keys: Jump to a specific screen
Ctrl + Shift + number keys: Moves the current screen to the specified screen
8. Formatting
Ctrl + [: Indent left
Ctrl +]: Indent Right
Ctrl + Shift + V: You can paste the code in the current indent
Tab: Auto complement keyword
9. Brackets
Ctrl + M: You can quickly switch between the opening and closing parentheses
Ctrl + Shift + M: You can quickly select the content between parentheses
Ctrl + Shift + J: For indented languages (such as Python), you can quickly select the contents of the same indented block
Note:
1.Ctrl + Shift + F: Open Multi-file search & Replace, this shortcut key and Sogou Input method of the simple shortcut keys have conflict, so when you can not adjust the search box, notice whether the current switch to the Sogou input method, if it is, switch to English input method, and then CTRL + Shift + F to call out.
2. OpenCtrl + Shift + F: Multi-file Search & Replace, by default in the currently open files and folders to search/replace,
We can specify a search/Replace in the currently open file
2.4 Setting 2.4.1 Single user settings
1. Sublime Text 3 default settings file cannot be modified (Preferences/settings-default)
2. If you want to modify the configuration (such as font, etc.), you need to modify the User's configuration file (Preferences/settings-user), copy the following code into "2" "3"
{
"color_scheme": "Packages / Color Scheme-Default / Monokai.tmTheme",
// Set Courier New monospace font for easy reading
"font_face": "Courier New",
"font_size": 12.0,
// make the cursor flicker more softly
"caret_style": "phase",
// highlight the current line
"highlight_line": true,
// highlight modified tags
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
]
}
Note: The added settings are placed in front of the following code, otherwise it will be an error; If you put it after the snippet, add a comma after the brackets.
"Ignored_packages": [ "Vintage" ],
3. If you want to set the TAB key and other code specifications, you can set the following "2"
// Set the tab size to 4
"tab_size": 4,
// use spaces instead of tabs
"translate_tabs_to_spaces": true,
// add line width ruler
"rulers": [80, 100],
// display whitespace
"draw_white_space": "all",
// Automatically remove white space at the end of the line when saving
"trim_trailing_white_space_on_save": true,
// Automatically add a newline at the end of the file when saving
"ensure_newline_at_eof_on_save": true,
2.4.2 Modifying the default profile location for sublime Text
1. After installing sublime text, the sublime text will generate a sublime Text 3 folder in the%appdata% directory for the configuration file and the various plugins installed later in the first run.
2. You can move this file to the sublime Text 3 installation directory for easy setup and packaging. So that at the same time in the company machine, home machine to ensure that 2 of the configuration can be synchronized. Specific settings can refer to "4"
2.4.3 Theme and color matching
1. How to install a Sublime Text theme?
There are 2 ways to do this:
(1) You can use the Colorsublime plugin to install the new theme (the easy).
Search for ' colorsublime ' in the package control and install the plugin. Installation steps, refer to "6"
Installation steps:
(2) Manual installation (the hard).
Refer to "5"
2. Install Colorsublime Plugin
There are 2 ways to:
(1) using the package Control (recommended)
Press Ctrl+shift+p to bring up the command panel, enter install to bring up the Install Package option and enter the plug-in name in the list colorsublime, select Plug-in installation.
(2) Manual Installation
Refer to "6"
3. Colorsublime Plugin Usage
(1) Press ctl+shift+p to open up Sublime Text ' s Command menu
(2) Select colorsublime:install Theme
(3) Use the arrow keys to run through the themes and see your current tab change in realtime!
3. Plugins
1. The Package Control
Plug-ins for managing plugins
2. Imesupport Plug-in
Sublime text support for Chinese input method has a small bug, that is, input in Chinese, input method can not be displayed in the Sublime text window, only in the Sublime text window, that is, "input box does not follow" "2"
Install the Imesupport plugin and restart sublime text.
3. ConvertToUTF8 Plug-in
Although it is possible to enter Chinese in ST3 and display it normally, ST3 will display garbled characters when opening a file that contains medium characters. Solve Chinese garbled problem, need to install ConvertToUTF8 plugin.
4. Htmlbeautify
formatting HTML
5. AutoPEP8
Format the Python code.
6. Alignment
For smart alignment.
7. Brackethighlighter
Highlight the matching brackets and the region where the current cursor is located.
References
"1" Package control:installation (https://sublime.wbond.net/installation)
"2" Sublime Text full Guide by Lucida (http://www.cnblogs.com/figure9/p/sublime-text-complete-guide.html)
"3" sublime text2 How to change the font? (http://jingyan.baidu.com/article/95c9d20d9d9f71ec4f756177.html)
"4" Build portable version Sublime Text2 (http://etosun.com/post/123)
"5" How to install a Sublime Text theme (http://colorsublime.com/how-to-install-a-theme)
"6" Colorsublime-plugin (Https://github.com/Colorsublime/Colorsublime-Plugin)
Sublime Text 3 Installation with the use of the package Control plug-in