Sublime text 3 Configuring the PHP development environment

Source: Internet
Author: User
Tags php development environment sublime text

First, install sublime Text 3

Official website: HTTP://WWW.SUBLIMETEXT.COM/3

Be sure to choose ST3, not st2,3 than 2 good, really, behind you will know.

Select the appropriate version to install. When you're done, install a basic, Essential package management: The packages control, used to install plugins later.

Second, the package control installation

Official website:

Open ST3, click on the menu View, show Console, will appear at the bottom of a command input box, and then copy the above command into the input box, enter, wait, the installation is successful.

ImportUrllib.request,os,hashlib; h ='eb2297e1a458f27d836c04bb0cbaf282'+'d0e7a3098092775ccb37ca9d6b2e4b7d'; 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 (''+ Pf.replace (' ','%20'). read (); DH = hashlib.sha256 (by). Hexdigest ();Print('Error validating download (got%s instead of%s), please try manual install'% (DH, h))ifDH! = hElseOpen (Os.path.join (IPP, PF),'WB'). Write (by)

Third, plug-in installation

After installing the package control above, we can install the plugin by opening the package control via the shortcut key ctrl+shift+p. Enter install in the input box that opens, and automatically prompts you to select the install package based on your input.

Tools->command Palette Use the command panel to quickly accomplish multiple tasks. Press COMMAND + Shift + P to bring up the panel and type the desired command.

Wait, and then an input box pops up, allowing you to enter the plugin you want to install.

We want to install a plugin that supports UTF8 encoding, just enter convert in the input box, automatically match, select ConvertToUTF8 plug-in, enter, wait, install complete, so that St support UTF-8 encoded.

? CONVERTTOUTF8 Installation

It is recommended to use the package Control to find ConvertToUTF8 for automatic download and installation and updates.

For manual installation, please download and unzip the project, modify the extracted folder name to ConvertToUTF8, and then move this folder to the Packages folder of Sublime text (available via Preferences in the Sublime text menu > Browse Packages Find Packages folder).

Your folder should look like this:

ConvertToUTF8 settings

Please see the converttoutf8.sublime-settings file for more information. To prevent overwriting when the plugin is updated, save the personal settings to the User directory named Converttoutf8.sublime-settings file. You can specify project-specific settings (except Encoding_list and Max_cache_size) in the. sublime-project file, which you can open with Project > Edit project.

Encoding_list: List of encodings displayed when detection fails

Max_cache_size: Maximum number of encoded caches, 0 means no cache (default is 100)

Max_detect_lines: Maximum number of detected rows, 0 means no Limit (default is 600)

Preview_action: Whether to convert its contents to UTF-8 when previewing a file (default = False)

Default_encoding_on_create: Specifies the default encoding for new files (such as GBK), and a null value indicates the default_encoding setting using Sublime Text (default = "")

Convert_on_load: Whether to convert its contents to UTF-8 when the file is loaded (default is True)

Convert_on_save: Whether the content is converted to the original (or specified) encoding when the file is saved (true by default)

Convert_on_find: Convert the contents of the Find Results window to UTF-8 (false by default)

Lazy_reload: Saves the file to a temporary location and automatically reloads in the background when the window or label is toggled (false by default)

CONVERTTOUTF8 Instructions for use

In most cases, this plugin will automatically handle encoding-related matters.

You can also manually convert the file encoding by using the files > Set file Encoding to menu. For example, you can open a UTF-8 encoded file, specify Save as GBK, and vice versa.

ConvertToUTF8 Note:

If Convert_on_save is set to False, the file is not saved to the specified encoding

Do not edit files until the file encoding detection process is complete

If the test results are inaccurate, try increasing the value of the Max_detect_lines or manually specifying the encoding

Due to API restrictions, when Lazy_reload is set to True, exiting Sublime text immediately after saving the file will cause the file to be saved as UTF-8, and the correct content will be overloaded the next time Sublime Text is opened

Sublime text 3 Configuring the PHP development environment

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.