Sublime Text Using notes

Source: Internet
Author: User
Tags html header

A Basic installation
1. Install the package control using the shortcut key Ctrl + ', bring up the Output window, and then enter the code provided by the official website, get the code address: Https://packagecontrol.io/installation#st2, Enter the code after the direct carriage to start the installation, wait a few seconds will prompt you to install the end, let restart the editor.

2. Use Ctrl+shift+p to invoke the command panel, enter "Package Control:install" (Install expansion pack), then enter to install the expansion Pack Command panel, note: Use COMMAND + Shift + P under Mac

3. Enter Jsformat in the Expansion pack installation command Panel, and then enter to install, two seconds to install successfully.

4. Paste a JSON code, click on the lower right corner plain text can change the file type to JavaScript, then the right-click menu Jsformat, or directly use the shortcut key CTRL + ALT + F

Two-install Emmet plugin to quickly generate HTML header information

1. Command + SHIFT + P Enter Emmet carriage return to wait for installation, reboot sublime after successful installation.

2. Command + N to create a new document, click Plain text in the lower right corner to change to an HTML format file.

3. Enter doc or html:4s or Html:xxs or html:4t or html:5 press the TAB key to create an empty HTML document.

Three install jquery plugin, no longer repeat

How to use: $.ready and then enter the TAB key

Four-Mount Sublimetmpl

1. Command + SHIFT + P

2. Enter the install package return

3. Enter Sublimetmpl return

4. Restart Sublime, press Shortcut control + OPTION + H (quickly generate HTML template)

Five installation of pretty JSON, parsing of JSON format data including encoding parsing

1. Command + SHIFT + P

2. Enter the install package return

3. Input pretty JSON carriage return

4, restart Sublime, press the shortcut control + COMMAND + j (formatted JSON string), win with the shortcut key (Ctrl + Alt + j)

Install the package control first, and then you can manage some plug-in and load-loading with the add control.

Install the package control to perform the following actions

The simplest method of installation is through the Sublime Text console. The console is accessed via the CTRL + ' shortcut or the View > Show Console menu. Once Open, paste the appropriate Python code for your version of Sublime Text into the console.

Sublime Text 2

Import Urllib2,os,hashlib; h = ' 7183a2d3e96f11eeadd761d777e62404 ' + ' e330c659d4bb41d3bdf022e94cab3cd0 '; PF = ' package control.sublime-package '; IPP = Sublime.installed_packages_path (); Os.makedirs (IPP) if not os.path.exists (IPP) else None; Urllib2.install_opener (Urllib2.build_opener (urllib2. Proxyhandler ())); by = Urllib2.urlopen (' http://sublime.wbond.net/' + pf.replace (', '%20 ')). read (); DH = hashlib.sha256 (by). Hexdigest (); Open (Os.path.join (IPP, PF), ' WB '). Write (by) if DH = = h else None; Print (' Error validating download (got%s instead of%s), please try manual install '% (DH, h) if DH! = H Else ' please rest Art Sublime Text to finish installation ')

Sublime Text 3

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.pat H.join (IPP, PF), ' WB '). Write (by)

Source: Https://sublime.wbond.net/installation#st3

Installing Jsformat

Sometimes from the internet to get someone else's JS code to learn, open found to be compressed, then you can use the Jsformat plug-in format JS code, restore the non-compressed when the typesetting, quite to the force. Press the shortcut key ctrl+alt+f to format the current JS file.

Source: Http://www.tuicool.com/articles/qEFJrm

Common Global User Configuration

Menu Bar-->preferentces-->settings-default

{

"Auto_complete": true,

"Auto_complete_commit_on_tab": true,

"Color_scheme": "Packages/user/monokai (SL). TmTheme",

"Draw_minimap_border": true,

"Draw_white_space": "All",

"Font_face": "Source Code Pro",

"Font_size": 12.0,

"Highlight_line": true,

"Highlight_modified_tabs": true,

"Ignored_packages":

[

"Vintage",

"Livestyle"

],

"Line_padding_bottom": 1,

"Line_padding_top": 1,

"Save_on_focus_lost": true,

"Tab_size": 4,//Set tab to four spaces

"Translate_tabs_to_spaces": true,

"Trim_trailing_white_space_on_save": false,

"Word_wrap": True

}

Menu bar:--> Preferences, Settings–more, Syntax Specific–user

{

"Tab_size": 4,

"Translate_tabs_to_spaces": false

}

The configuration file will be applied in the following order:

Packages/default/preferences.sublime-settings

Packages/default/preferences (<platform>). sublime-settings

Packages/user/preferences.sublime-settings

Packages/<syntax>/<syntax>.sublime-settings

Packages/user/<syntax>.sublime-settings

Normally, you should put your configuration in the packages/user/preferences.sublime-settings. If you want to specify a configuration for a particular file type, such as Python, it should be placed in the Packages/user/python.sublime-settings file.

Common plugins: Http://www.tuicool.com/articles/qEFJrm

Sublime Text Using notes

Related Article

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.