Home  >  Article  >  Backend Development  >  Configuration and use of Zend Studio

Configuration and use of Zend Studio

WBOY
WBOYOriginal
2016-08-08 09:23:421657browse

 Perhaps you can use things like Dreamweaver, Notepad++ or Editplus to complete your system, but as the saying goes, "If you want to do your job well, you must first sharpen your tools." I think a powerful IDE is still necessary for novices, and Zend as The most advanced IDE recognized by PHPers has naturally become my choice. The version I installed is 7.2.1. This article will introduce my transformation of this "new" tool. Finally, I will leave a few questions for the experts to solve.

 1. Change the Zend working directory

 2. Change the Zend font

 Go to Window——Preferences——General——Appearance——Colors and Fonts——Basic——Text Font to modify, I still like it Consolas No. 16:

3. Change the default settings for new document templates

By default, the code automatically generated for new PHP files is:

A closed PHP tag can be generated when the file is created, so enter Window -> Preferences -> PHP -> Editor -> Templates -> New simple PHP file modification:

  4. Modify the automatic prompt code speed

 Zend is a slow person, and the default code prompt delay is 500 milliseconds, which obviously does not meet the quick temper of Coders, so go to Window -> Preferences -> PHP -> Editor -> Content Assist ->Auto Activation, Set the code automatic prompt speed from 500 to 50:

5. New template

Zend already comes with many templates. You can go to the place above to modify the default new PHP file template, but It is inevitable that there will not be enough, so we need to create a new template:

Pay attention to selecting newphp in the context, because the template name cannot be found when creating a new one.

 6. Change the shortcut keys

This is similar to VS. I believe you will inevitably be unhappy with the key positions of some shortcut keys. For example, Ctrl+K and C are used as shortcut keys for comments. This is obviously only for two hands. You can operate the completed work quickly, so we will make modifications, such as changing to Ctrl+E, C, etc. The default in Zend is to add block comments is Ctrl+Shift+/, and to cancel block comments is Ctrl+Shift+, and To add or cancel single-line comments, the default switch is Ctrl+/. I still don’t want to use two hands to operate, so I decisively changed it. The single-line comment switch I changed is Ctrl+E, the block comment is Ctrl+R, and the cancel block comment is Ctrl+ G.

In addition, the debugging changes are consistent with the habits of VS. Debugging is changed from F11 to F5, running is changed from Ctrl+F11 to Ctrl+F5, Step into is changed from F5 to F11, and Step Over is changed from F6 to F10.

 The changes in the above two parts can be seen by entering "comment" and "debug" in the search box.

  7. Install JSEclipse

 The prompt for JS is stronger, but Zend’s own one is slightly weaker. A better choice here is to install the JSEclipse plug-in. We go to Help -> Install newsoftware

There are two There are two installation methods, one is to add the online installation address http://download.macromedia.com/pub/labs/jseclipse/autoinstall, and of course, download the installation package to the local machine and install it. If you unzip it, select Local Find the local folder and confirm, or if you are too lazy to unzip it, you can just select Archive.

  Click Next to complete the installation. .

 After installation, you must select JSEclipse as the default Javascript editor before you can use JSEclipse. Go to Window -> Preferences -> General -> Editors -> File Assocaitions:

Set "Default".

  Similarly, the code prompts are also modified faster:

  The default value of the original "outline reparsing delay (ms)" is 500, and the default value of "Code Completion popup delay (ms)" is 200.

 8. Window layout

Use Alt+Shift+Q, V to bring up the variable window to facilitate tracking the values ​​of related variables during debugging

 In addition, you can bring up the Debug and Debug OutPut windows to facilitate tracking and debugging

Still in Window ——Call up the PHP Function window in Show View. You can take a look when you are too lazy to open the manual.

In order to make the final layout look pleasing to the eye, it still looks like VS. The lower part can be minimized to increase the work area.

 9: Annotation experience

When everyone adds comments to a function in VS, they will enter three / in succession, so that they can add a summary of the function. I thought this function was not available in Zend, but still I discovered it in an accidental comment. Just type /** and press Enter to add a comment to the function. The effect is as shown below:

Okay, the above is probably my transformation of Zend. Finally There are a few that I use frequently in VS, but I haven’t found the implementation problem in Zend yet. I hope the experts can give me some advice:

1. In VS, I will set all files to automatically wrap, that is, one line of code. When the display cannot be completed, it will be displayed in a new line instead of continuing to display, resulting in a horizontal scroll bar. This way the code can be dragged around, which greatly affects the readability of the code. I have only found that there is a "Toggle Word Wrap" option by right-clicking on the workspace to make the current page display a new line, but I have not found a function setting that allows all files to be wrapped uniformly.

  2. In addition, there is also a "go to definition" function that is often used, that is, right-click on a function or variable to go to the definition, and then go to the line where the function or variable is initially defined. This is in many files. It is more useful, but it is not found in Zend.

  3. Another common function is that if I enter a function or variable, Zend will definitely prompt, OK, suppose I accidentally click on something else, such as touching the touch pad, so because of the mouse click , the smart prompt box must have disappeared, right? At this time, is there a way to press a certain key to bring up the prompt box, without having to delete the function that was typed in half and then start typing from the beginning to make the prompt box appear? . This is Ctrl+J in VS, but I haven't found how to implement it in Zend.

The above introduces the configuration and use of Zend Studio, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn