How to autocomplete php tag in netBeans?

2

I'm a beginner in PHP and would like to know how to do netBeans autocomplete the tag <?php ?> because every time I have to write the whole tag and this is filling me up (in SublimeText it writes, only I prefer NetBeans because it displayed a list of variables after the dollar sign).

    
asked by anonymous 26.07.2017 / 15:35

1 answer

2

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

In NetBeans click:

  

Tools > Options > Editor > Code Templates

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

Click New , type the shortcut you want autocomplete, for example php , click OK .

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

Example:

<?php ?>

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

Click OK .

When testing, put the shortcut that in my case was php and then press Tab .

  

"And see the Magic!"

For more information: link

    
26.07.2017 / 19:00