Ublime Text 3 Installation and usetool 2015-07-30 10:46 0
工欲善其事, its prerequisite. Good tools help us save a lot of work time, and the easy-to-use plugins make the tools more powerful.
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, check the Add to Explorer context menu,
This 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.path.join (IPP, PF), ' WB '). Write (by)
This code creates the installed Packages folder for you (if necessary), and then downloads the
Package Control.sublime-package into 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 filters the results in real time and selects the plug-ins to install based on the filtering results in the command panel.
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,
An installation package plug-in that contains multiple files (such as Converttoutf8,imesupport) is placed in the packages 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 Sublime text console
- CTRL + K, CTRL + B: Key combinations to show or hide the 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 line and jumps to that row
- Ctrl +←/→: Move word by phrase,
- Ctrl + Shift +←/→: Making 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, CTRL + D again, select the next position where the word appears
- Ctrl + K: In the process of multiple selection of words, the currently selected words will be skipped
- Ctrl + U: In the process of multiple selection of words, the fallback,
- ESC: Exit multiple edits
- Ctrl + Shift + L: Break the current selection and edit it at the same time
- Ctrl + J: Merge the current selection into one row
4. Find
- Search for keywords that use shift +←/→ or CTRL + D or mouse selection:
- F3: Jump to keyword next occurrence position
- Shift + F3: Jumps to the top of a keyword where it appears
- ALT + F3: Selects all locations where the keyword appears (can be quickly replaced later)
- Ctrl + F: Bring up the search box
- Enter: Jump to the next position in the keyword
- Shift + Enter: Jumps to a position on the keyword
- ALT + Enter: Select all occurrences of the keyword (again, you can quickly replace it)
- Ctrl + H: Bring up the Replace box to replace
- Ctrl + Shift + H: Replace the current keyword after entering the replacement content
- Ctrl + Alt + ENTER: After you enter the replacement, replace all matching 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 integer match (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 to jump to the file
- Combo Jump ("Go to Anything"): Ctrl + P matches to a file, we can make subsequent input to jump to a more precise position
- @ symbol Jump: Enter @symbol jump to the symbol location
- # keyword Jump: Enter #keyword jump to the location where keyword is located
- : line number Jump: Input: 12 jump 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), enter the symbol name enter to jump to that place.
- Outline of the markdown file is listed
- F12: Quickly jumps to the definition of the symbol at which the cursor is currently 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 numbers to jump to the specified line
6. Window and tab page
- Ctrl + N: Create a new tab 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, or close the window if there is no label page
- Ctrl + Shift + T: Restores the label just closed.
7. Split screen
- Alt + Shift + 2: Left and right split screen
- Alt + Shift + 8 to split the screen up and down
- Alt + Shift + 5 to split the screen up or down (that is, four screens)
- CTRL + Number keys: Jump to a specified screen
- Ctrl + Shift + number keys: Move 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 toggle between the opening and closing brackets
- 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 statement 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 so, switch to English input method, and then Ctrl + Shift + F call up.
2. Ctrl + Shift + F: Turn on multi-file search & Replace, search/replace by default in the currently open files and folders.
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 fonts, 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 width font to read "Font_ Face ":" Courier New ", " font_size ": 12.0, //Make the cursor blink more softly " Caret_style ":" Phase ", //Highlight current line " Highlight_line ": True, //highlighted with modified label " Highlight_modified_tabs ": True, " ignored_packages ": [ "Vintage" ]}
Note: The added settings should be 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 tab size to 4 "Tab_size": 4, //use a space instead of tab "Translate_tabs_to_spaces": true, //Add line width ruler "rulers": [+], //display blank character "Draw_white_space": "All", //save automatically remove the end of the line "Trim_trailing_white_space_on_save" : true, //save automatically add end of file wrap "Ensure_newline_at_eof_on_save": true,
2.4.2 Modifying the default profile location for sublime Text
1. After installing sublime text, in the first run, sublime text will be in the%appdata%
Record a folder that generates a sublime Text 3 for the configuration file and the various plugins that are installed later.
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
, enter the plug-in name Colorsublime in the list and 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, when inputting Chinese, input method can not display
Above the sublime text window, it can only be displayed outside the sublime text window, i.e. "input box does not follow" "2"
Install the Imesupport plugin and restart sublime text.
3. ConvertToUTF8 Plug-in
Although you can enter Chinese in ST3 and display it normally, but when you open a file that contains characters,
ST3 will display garbled 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.
Reproduced this site article please indicate the source: Love Development http://www.imlwj.com/blog/?p=9
Ublime Text 3 Installation and use