How to autocomplete php tag in netbeans?

Asked

Viewed 206 times

2

am a beginner in PHP and would like to know how to make netbeans autocomplete the tag <?php ?>because every time I have to write the whole tag and it’s filling me up (on Sublimetext he writes, only I prefer Netbeans because it displays a list of variables after the dollar sign).

Como autocompletar esta tag?

1 answer

2


Netbeans does not complete this code by default, so you will have to manually add the code template.

In Netbeans click on:

Tools > Options > Editor > Code Templates

Choose the language HTML as this is being used until you put the PHP tag.

Click on New, type which shortcut you want to autocomplete, for example php, click on OK.

On the next screen enter the code you want to autocomplete when writing php.

Example:

<?php ?>

In Expand Model in: select the key you want to trigger the autocomplete, for example: Tab.

Click on OK.

When you’re testing put the shortcut that in my case php and then press Tab.

"And see the Magic!"

For more information: https://netbeans.org/kb/docs/php/code-templates_pt_BR.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.