PHP Daily Development Tools-sublime Application

Source: Internet
Author: User
Tags php editor sublime text

工欲善其事, its prerequisite. Here I recommend sublime Text3 as the PHP editor, hereinafter referred to as ST3, because not only the system resources are small, open fast, and has the following advantages:

    1. More plug-ins, similar Emmet to the easy, very handy.
    2. The UI is beautiful, smooth, no slack, and the simplicity of the interface helps to focus on the code.
    3. 代码地图is the highlight.
    4. Powerful code completion, auto indent.
    5. Shortcut keys are very useful, the first most amazing I was to see the official homepage of the shortcut key demonstration.
    6. Powerful command line, as efficient and convenient as vim.

Here I summarize my sublime use experience to share out, master these several, will for you development save a lot of time, so the PHP development technology will rise a step.

First you need to have a sublime, it is recommended to use ST3, because ST3 has a lot of new features, such as function jump and so on. To the official website according to your operating system select the corresponding ST3 download, here I am using Windows version 64.

  

After the download, we need to configure Sublime's package Control, we open sublime Text3, and click Show Console:

Then paste the code of the package control into it and enter it:

ImportUrllib.request,os,hashlib; h ='df21e130d211cfc94d9b0905775a7c0f'+'1e3d39e33b79698005270310898eea76'; 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))ifDH! = hElseOpen (Os.path.join (IPP, PF),'WB'). Write (by)

So we've installed the package control, a pack management tool, to install third-party tools.

Then start sharing experience:

  Sublime Text 3 Grammar Check test

Developed code friends know that the code debugging is very difficult, the development of debugging takes a lot of time, so I put this method to share to you, for example, you write a class file, or your PHP code error, if you have been to see the browser feedback information, it will be an unusual waste of time, This syntax check allows you to quickly locate the wrong address and then modify the syntax so you can focus on the rest of the code.

First we need to configure the environment:

Action, and then paste the following code in:

{    "cmd": ["php","-L" ,"$file"],}

The function of this code is to check the PHP file syntax correctness, using CTRL+B, you can check the current writing file has no syntax errors, such as the following PHP file there are a few grammatical errors, let us check, Ctrl+b:

In this case, the syntax error of the file is checked out. If mastered this skill, will save a lot of time for us, in the future when the development of the habit must be developed, after the preparation of the files are ctrl+b check this file.

  List of ctrl+r functions :

This technique, for example, has a lot of methods for a class file, and you can use this technique to quickly get a quick overview of the file, just like this:

In this case, the entire file function list is seen, is not very time-saving? This method is especially useful to quickly locate the method without having to search it yourself, using this method in development and saving time

  Right-click Jump function :

Sublime Text3 provides a function jump, which is a useful method in the actual development, with this method, face a method you do not have to find this method is from where to refer to, only need to right click on it can jump past, in development is very useful, can save a lot of time

  

Click on a method, then right click on the goto defination, meaning jump to the definition, using this method, the development time can be more effective.

Share these skills for the time being and will continue to share your experience with us.

PHP Daily Development Tools-sublime Application

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.