Ubuntu Installation Sublime Tutorial

Source: Internet
Author: User
Tags sublime text sublime text editor

1. Install sublime Text 3 and common artifact plugin
① First add sublime Text 3 warehouse: sudo add-apt-repository ppa:webupd8team/sublime-text-3 Follow the prompts press ENTER to continue, build the trust database
② Add sublime text 3 to the repository: sudo apt update
③ last install sublime Text 3:sudo apt Install Sublime-text-installer

This software installation is successful.

2. Install the package Control
Enter command SUBL open sublime Text 3
Press the shortcut key CTRL + ' (ESC button below), enter the code in the popup console
Import Urllib.request,os,hashlib; h = ' 2915d1851351e5ee549c20394736b442 ' + ' 8bc59f460fa1548d1514676163dafc88 '; 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)
After restarting the software, you can find the package Control command under the Preference menu, click Run Packeage Control, enter

3. Install common plug-ins

Installation method ctrl+shift+p--> Input install--> Press enter--> find plug-in to confirm

1.Git Common git community has csdn, GitHub, open source China, and its own Git server, in the process we used to use Git directly in the software, rather than to switch to the terminal to run the corresponding command.

2.GitGutter Gitgutter better help developers to see the changes and differences before the file, improve the development efficiency, reduce the wrong submission, code conflicts.

The 3.Emmet Emmet Project was formerly known as the Zen Coding by front-end developers (a solution for writing HTML/CSS code quickly). The Sublime Text editor with the Emmet plugin really lets you encode faster.

4.SublimeREPL This plugin allows you to run various languages (such as Nodejs,python,scala and so on) in sublime, so it is not programmed

5.DocBlockr If you follow the coding style is very strict, this plug-in can make your task easier. DOCBLOKR helps you create your code annotations by parsing functions, parameters, variables, and automatically adding basic items

6.CSSComb This is the plugin used to sort the CSS properties, and if you want your code to look neat and clean, then this plugin is an effective solution, especially when many people can maintain a consistent coding style when developing.

7.Alignment This plugin allows you to align your code, including PHP, CSS, and Javascript. The code looks more concise and readable, making it easy to edit.

8.Trmmer you know that when you write code, there are some unnecessary spaces due to errors or some other reason. It is important to note that extra spaces can sometimes cause errors. This plugin will automatically remove these unnecessary spaces.

9.ColorPicker If you often want to view or set the color value, this plugin can easily call your native palette app. (Translator extension:) This is a two-way function, you can either select a color in the palette, and then press the "OK" button to fill the value into the current position of the active document in Sublimetext, or you can select a color value in the active document. Pressing the shortcut key for this plug-in will navigate to the color of that value in the displayed palette

10.angularjs can quickly prompt completion when writing angularjs, avoid write wrong

11.reactjs We often forget some grammar, need to find, in order to avoid unnecessary trouble, install Reactjs can solve the problem of forgetting react grammar

12.SpaceGray a good theme can make people happy, avoid the wrong code, put it on, you can have exciting themes.

4, sublime commonly used shortcut keys:

Master the Basic Code Editor shortcut keys, can make you play code more efficient

① Essence Key:

Ctrl+shift+p: Open Command Panel
Ctrl+p: Searching for files in a project
Ctrl+g: Jump to the first few lines
CTRL+W: Close the currently open file
CTRL+SHIFT+W: Close all open files
Ctrl+shift+v: Pasting and formatting
Ctrl+d: Select words, repeat to add the next same word
Ctrl+l: Select rows, repeat to select the next row in turn
Ctrl+shift+l: Select multiple lines
Ctrl+shift+enter: Inserting a new row before the current line
Ctrl+x: Delete When moving forward
Ctrl+m: jump to corresponding parentheses
Ctrl+u: Soft undo, undo cursor Position
CTRL+J: Select label content
Ctrl+f: Find Content
Ctrl+shift+f: Find and replace
Ctrl+h: Replace
Ctrl+r: Go to Method
CTRL + N: New window
CTRL+K+B: Switch Side bar
Ctrl+shift+m: Check the contents of the current parenthesis, repeating the parentheses themselves
CTRL+F2: Set/Remove Tags
ctrl+/: Comment When moving forward
ctrl+shift+/: Insert comment at current position
ctrl+alt+/: Block comment, and focus to the first line, write the comment description with the
Ctrl+shift+a: Before and after selecting the current label, modify the label with
F11: Fullscreen
SHIFT+F11: fullscreen-free mode, editing only the current file
ALT+F3: Select all the same words
ALT +.: Closed Label
alt+shift+ Number: Split screen display
ALT + Number: Toggle to open nth file
shift+ Right-drag: Many cursors are not used to change or insert column contents
Mouse forward and backward key to toggle tab file
Press CTRL, tap or select, to edit multiple locations
Press ctrl+shift+ up/down key to replace row

② Select class:

Ctrl+d the text that the cursor occupies, and continues, the next identical text is selected.
Alt+f3 the selected text by pressing the shortcut key, you can select all the same text at once for simultaneous editing. Give a chestnut: quickly select and change all the same variable names, function names, and so on.
Ctrl+l selects the entire row, and continues to select the next row, with the same effect as the shift+↓ effect.
Ctrl+shift+l Select multiple rows First, and then press the shortcut key to insert the cursor at the end of each line to edit the rows at the same time.
Ctrl+shift+m Select the contents in parentheses (continue to select the parent bracket). Give me a chestnut: Quickly select the code in the delete function, rewrite the function body code, or rewrite the contents of the parentheses inside. The
ctrl+m cursor moves to the end or start position within the parentheses.
Ctrl+enter Inserts a new row on the next line. For a chestnut: even if the cursor is not at the end of the line, you can quickly insert a line down.
Ctrl+shift+enter Inserts a new row in the previous line. For a chestnut: even if the cursor is not at the beginning of the line, it can be inserted quickly.
Ctrl+shift+[Select the code, press the shortcut key, and collapse the code.
ctrl+shift+] Select the code, press the shortcut key, and expand the code.
Ctrl+k+0 expands all collapsed code. The
ctrl+← moves the cursor to the left and moves the cursor quickly. The
ctrl+→ moves the cursor to the right and moves the cursor quickly. The
Shift+↑ selects multiple rows upwards.
Shift+↓ to select more than a row.
Shift+← selects the text to the left.
shift+→ Select the text to the right.
ctrl+shift+← the text to the left of the unit.
ctrl+shift+→ the text to the right of the unit. The
ctrl+shift+↑ swaps the cursor at the line and the previous line of code (before inserting the row of the cursor into the previous row). The
ctrl+shift+↓ swaps the cursor at the line and the next line of code, inserting the row of the cursor after the next line.
Ctrl+alt+↑ adds a multiline cursor up, editing multiple lines at the same time.
Ctrl+alt+↓ adds a multiline cursor down to edit multiple lines at the same time.

③ Edit class:
Ctrl+j Merge the selected lines of code to one line. For a chestnut: merge the CSS properties of the multiline format into one line.
Ctrl+shift+d the entire line where the cursor is copied, and inserts it into the next row.
Tab right indent.
Shift+tab indents to the left.
Ctrl+k+k removes code from the cursor at the end of the line.
Ctrl+shift+k Delete the entire row.
ctrl+/Comment Line.
ctrl+shift+/comment Multiple lines.
Ctrl+k+u convert uppercase.
Ctrl+k+l convert lowercase.
CTRL + Z undo.
Ctrl+y restore Undo.
Ctrl+u soft undo, feeling and gtrl+z the same.
CTRL+F2 setting bookmarks
Ctrl+t around the letter interchange.
F6 Word detection spelling

③ Search class:
Ctrl+f Open the bottom search box to find keywords.
Ctrl+shift+f in folders, unlike the normal editor is sublime allow to add multiple folders to find, slightly high-end, not researched.
Ctrl+p Open the Search box. For a chestnut: 1. Enter the file name in the current project, quickly search for files, 2, enter @ and keywords, find the function name in the file, 3, enter: And number, jump to the line code in the file, 4, enter # and keyword, find the variable name.
Ctrl+g Open the Search box and automatically take:, enter a number to jump to that line of code. For a chestnut: Quickly locate a file in which the page code is relatively long.
Ctrl+r Open the Search box, automatically with @, enter keywords, find the function name in the file. For a chestnut: Quickly find a function on a page with more functions.
CTRL +: Open the search box, automatically with #, enter keywords, find variable names in the file, attribute names, and so on.
Ctrl+shift+p Open the Command box. Scene Chestnut: Open the Name box, enter the keyword, call sublime text or plug-in features, such as using the package installation plugin.
ESC exits the cursor multi-line selection, exits the search box, command box, and so on.

④ Display Class
Ctrl+tab Toggles the tab of the current window in the order in which the files were browsed.
Ctrl+pagedown Toggles the tab of the current window to the left.
Ctrl+pageup Toggles the tab of the current window to the right.
alt+shift+1 window split screen, restore the default 1 screen (non-keypad number)
Alt+shift+2 left and right split screen-2 columns
Alt+shift+3 left and right split screen-3 columns
Alt+shift+4 left and right split screen-4 columns
Alt+shift+5 4 Screen
Alt+shift+8 Vertical Split Screen-2 screen
Alt+shift+9 Vertical Split Screen-3 screen
Ctrl+k+b Toggle the sidebar on/off.
F11 Full Screen mode
SHIFT+F11 free-to-disturb mode

Reference: http://blog.csdn.net/coding99/article/details/52421337

Ubuntu Installation Sublime Tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.