Sublime Text 2 Configuration development JS

Source: Internet
Author: User
Tags lua php template xslt sublime text

Sublime Text 2 Introduction

Many of the Ides are also too large to write Javascript,eclipse Ides, and notepad++ is a good choice. And today I occasionally find a good editor Sublime Text 2. She is a fee software, but can be permanently free trial, when saved occasionally pop-up buying Tips

    • Simple and beautiful user interface
    • Supports multiple syntax highlighting: C, C + +, C #, CSS, D, Erlang, HTML, Groovy, Haskell, HTML, Java, JavaScript, LaTeX, Lisp, Lua, Markdown, Matlab, OC AML, Perl, PHP, Python, R, Ruby, SQL, TCL, Textile, XML, etc.
    • Support for code completion
    • Support multi-plug-ins, depending on your needs can use a variety of plug-ins to help you work and simple
    • Mini-map, you can use the scroll bar to control the code for easy code viewing


Installing the sublime Text 2 plugin

Install using the Package control component and install it directly online

1. Press CTRL + ' bring up console

2. Paste the following code into the bottom command line and enter:

import urllib2,os;pf=‘Package Control.sublime-package‘;ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),‘wb‘).write(urllib2.urlopen(‘‘+pf.replace(‘ ‘,‘%20‘)).read())


4、查看是否安装成功,使用ctrl+shift+p 然后输入install出现

5, click InstallPackage, so我们可以使用在这个插件安装包管理器了,然后回车,等着一分钟,出现插件列表

Enter the plug-in you need to install, find the installation

Install common plugins:

Emmet is a front-end development tool, its predecessor is the Zen Coding. It makes it easier to write HTML code. The basic usage of Emmet is: Enter a shorthand form and press the Tab key.
For more usage of Emmet, please see the official documentation, which can help you quickly memorize shorthand forms.

Sublimelinter is a code validation plugin that can help you find errors or write code that is not canonical, and supports C/s, Coffeescript, CSS, Git Commit Messages, Haml, HTML, Java, JavaScript , Lua, Objective-j, Perl, PHP, Puppet, Python, Ruby, and XML languages.

Sidebarenhancements is a very useful right-click menu Enhancement Plug-in, there is a diff format to display unsaved changes, display the file in the File Manager, copy the file path, locate the file in the sidebar, etc., there are basic such as new file/directory, edit, open/Run, Display, in Select/Parent directory/Project Find, Cut, copy, paste, rename, delete, refresh and other common functions.

Sidebarenhancements also has a function is to customize the program to open the file, in the sidebar right click on a file (folder), select Open with edit applications can modify the association, the configuration file comes with an example, can be easily applied.

Copy as Text ... Sidebarenhancements is another feature, you can copy the various forms of the path, URL (even including Base64 Data:uri), transcoded filename, a variety of HTML tags (A, img, script, style) and so on.

No.04–sublime? Code? Intel
Sublime? Code? Intel is a code hint, complete plug-in that supports JavaScript, Mason, XBL, XUL, RHTML, SCSS, Python, HTML, Ruby, Python3, XML, Sass, XSLT, Django, HTML5, Languages such as Perl, CSS, Twig, less, Smarty, node. js, Tcl, Templatetoolkit, and PHP are a good extension of the Sublime Text code hinting feature. It also has a function that jumps to the variable, function definition place, is very convenient.

Using Sublime? Code? Intel before you need to install the appropriate program and write the path to ~/.codeintel/config or Project_root/.codeintel/config, the ReadMe has detailed instructions, no longer repeat.

Very not recommended to put Sublime? Code? Intel is used with extension package in a single language, although many language extensions are more than Sublime? Code? Intel's code hinting function needs to be perfected. If you need to use it together, in the user profile (menu Preferences, Package Settings, Sublime?). Code? Add the following to Settings–user in Intel, and remove the language you want to disable.

"codeintel_enabled_languages":    [    "JavaScript","Mason","XBL","XUL","RHTML","SCSS","Python","HTML",    "Ruby","Python3","XML","Sass","XSLT","Django","HTML5","Perl","CSS",    "Twig"," Less","Smarty","node. js","TCL","Templatetoolkit","PHP"    ],    "codeintel_live_enabled_languages":    [    "JavaScript","Mason","XBL","XUL","RHTML","SCSS","Python","HTML",    "Ruby","Python3","XML","Sass","XSLT","Django","HTML5","Perl","CSS",    "Twig"," Less","Smarty","node. js","TCL","Templatetoolkit","PHP"    ]

Alignment is a code-formatting plug-in that aligns the equals sign in multiple lines of code, adjusts multiple lines of code to an indentation level, and the default shortcut key is Ctrl+alt+a (Mac OS is cmd+ctrl+a).

No.06–bracket? Highlighter
Bracket? Highlighter is a bracket, quotation mark, label highlighting plug-in, support [], (), {}, "", "and so on, than the Sublime Text comes with a significantly more highlighting.

GIT plug-ins integrate Git's common functionality by installing git and writing to environment variables before using it.

JS Format Plugin

Sass File Beautification Plugin

Automatically adds block-level comments to the function.

No.11–pretty JSON
JSON Landscaping Extension Extensions

No.12–sublime? Tmpl
html/js/css/php Template Plugin

No.13–sublime Function Name Display
This plugin displays the current file, class and function name on the status bar in Sublime Text 2 and 3.

Sublime Text 2 Configuration development JS

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: 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.