Work by Day-the first Blog Day & Happy Day, the first blogday

Source: Internet
Author: User

Work by Day-the first Blog Day & Happy Day, the first blogday

Today (Monday), I saw a colleague's life plan, which seems to be quite suitable for me. In practice, theo & tools day + code day + blog day, intermittent happy day ~

Blog day. This is a blog summary. If there are too many contents, write a single article and give the link in the summary article.

========================================================== ==========

2016.06.20

I was planning to write a small web page, about Moz code, but the zend tool is not good. I found a blog and wrote it well. In practice, if I have time, I will learn something else.

==============================

Pit http://my.oschina.net/junn/blog/161409--zend

2.By default,Zend studio cannot open the. tpl file. Is there any way to support. tpl template files and other formats, such as dwt.

To open. tpl file. You can open window-> preferences-> general-> content types, select a file type on the right, such as html, and add * below *. tpl, save it. In this way, double-click the *. tpl file to open it with the zde built-in editor.

4. How to display

/**
*
* @ Copyright (c) 2009
* @ Author oo
* @ Package common
* @ Version $ Id: template. php
*/
The reality is exhausted (display something similar to [gently Note]). I called PHPDOC online, but I still didn't understand it. Thank you.

This is the Templates function of zend studio for eclipse.
Old Version: choose window> preferences> php> templates and find New simple PHP file on the right.
New Version: choose window> preferences> php> code style> code templates. Find Simple php file on the left,
The default content is as follows:
<? Php
$ {Cursor}
?>
This is the default template when we use zend studio for eclipse new phpfile. You can directly modify this template to meet your requirements. Of course, it is better to create a new template, select new php for its context and edit your template. Some variables are supported here. BTW: many people may think that $ {user} can be used as Author. In fact, this variable is your OS login name. For example, my account is administrator.

So how to use it?When using New-> php file to create a file, use the New simple PHP file or the New template name you modified in the next step of the wizard.


New Version: choose window> preferences> php> code style> code templates to add a file header comment:

<? Php/*** xxx. php * = * Copy right 2013-2014 http://www.123.com * ------------------------------------------------------------ * This is not a free software, without any authorization is not allowed to use and spread. * ===================================================== =======* @ param $ {unknowtype} * @ return $ {return_type} * @ author: $ {user} * @ date :$ {date} * @ version: v1.0.0 * // *** @ Func: Function Description * @ date: $ {date} * @ author: $ {user} * @ return: $ {return_type} * // file Description * @ date $ {date} $ {time} * @ author xxx * @ version 1.0.0 * @ copyright xxx *//** * @ desc: description * @ author :$ {user} * @ date :$ {date} */# template format to be added # Name: mdt # description: methods describe the template # mode:/*** The descriptions of functions. ** @ access public | private | protected * @ param mixed $ name comment * @ Param int $ name comment * @ param string $ name comment * @ param bool $ name comment * @ param array $ name comment * @ return void | int | string | boolean | array comment */# example #/*** The descriptions of functions. ** @ access public | private | protected * @ param mixed $ name comment * @ param int $ name comment * @ param string $ name comment * @ param bool $ name comment * @ param array $ name comment * @ return Void | int | string | boolean | array comment */?>


New Version: choose window> preferences> php> editor> templates to create a template.:

6. What is the code folding function of zend stdio for ecplise?

 

It mainly needs to be set in two places, respectively for PHP and other files


Current View:

Code folding shortcut:



Ctrl +/(keypad) collapse all code in the current class
Ctrl + * (keypad) show all the code in the current class
Ctrl + Shift +/hide all code in the current class

 

7. Common shortcut keys:

1. Press ctrl + D to delete the row where the current cursor is located.

2. In the editing window, press CTRL + E. The page for switching is displayed.

3. Added multi-Action scale-down progress

In the editing window, select any number of lines of code and press the Tab key. The Code indent adds a Tab distance.(To remove indentation, select the code and press Shift + Tab together ).

4. Ctrl +/comment on a single row. When the current code is used, add a double slash line comment to the row where the cursor is located. If multiple lines are used, add a double slash to each line. When the code is html, add a line before and after the line <! --> Comment. Multiple lines are selected and added before and after the selection. <! --> Add comments instead of each line

5. Ctrl + Shift +/block comments to add/**/block comments to the selected PHP code. If no code is selected, add block comments to the row where the cursor is located.

6. ctrl + shilft + f to quickly format the code

7. ctrl + H search for a method name or other related files in the entire project

8. When the cursor moves to a row, click the cursor three times to select the entire row.

 

9. tab code indent under zend studio for ecplise

==================

Http://blog.csdn.net/e421083458/article/details/48712691

Zend studio automatically adds file comments and method comments

Go to preference => PHP => Editor => Template => New

File notes:

Enter Name \ Description \ Pattern respectively (line feed as the interval ):

3 cfile

File annotation Template

/**

* File Usage description

* @ Date: $ {date }$ {time}

* @ Author: $ {user}

*/

Function notes:

3 cmethod

Method annotation Template

/**

* Function usage description

* @ Date: $ {date }$ {time}

* @ Author: $ {user}

* @ Param: $ {variable}

* @ Return:

*/

Usage:

Press 3 and follow the code prompts and select.

============================

The above are basically reprinted.However, to sum up the things on both sides, I made a framework for creating a simple php file, and templates for classes, methods, and functions. I will post them tomorrow!

Tomorrow, Wednesday, code day will be ready for use on the moscode webpage. Do not try the template first. First, make a simple OO & MVC model.

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.