Editing a Code Snippet

The following procedure describes how to edit an existing code snippet.

 

Only user defined snippets are fully editable.

 

To edit a snippet from the Code Gallery, first save it (Save As) to create an editable copy of the snippet (under User Defined).

 

To edit a Code Snippet:

  1. From the Edit menu, select Show Snippets.
    -Or- right-click anywhere in the main Editor workspace and select Show Snippets from the right-click menu.
    The Code Snippets window opens.  

  2. From the Code Snippets tree to the left of the Code Snippets window, click the snippet you wish to edit.
    The code snippet appears in the Preview pane of the Code Snippets window.  

  3. To edit the code snippet, click Edit.
    The Edit Snippet window opens with editable code displayed in the Snippet Code workspace.  

  4. Edit the code as you wish.  

  5. Click OK.
    Zend Studio overwrites the Code Snippet with the edited version.  

Note:

Zend Studio allows you to remove a user defined Code Snippet simply by selecting the code snippet from the list and clicking Remove.  

 

 

Related Links

Related Links:
Code Snippets

Updating the Code Snippet Database

Editing

Using Code Completion

@var tag as Class Type Hint

Using Templates

Indenting Code

Commenting Lines Blocks

Inserting HTML Tags

Usability Shortcuts/Timesavers

Matching Highlighted Elements

Clone View

Open

Printing