Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans - shortcut for importing namespaces

does anyone know if there is a key combination for importing classes in Netbeans?

enter image description here

By pressing enter when I get the suggestions, the namespace is imported in the method like this: public function index(\Illuminate\Http\Request){

What I want to achieve instead, is to add a line use Illuminate\Http\Request in the top of the file. How can I do this in netbeans? I have seen it in Phpstorm.

Also, another question a little off the topic, but I have seen people generating html5 code by typing html5 and with some key combination they generate a doctype, html, head and body. How can I do this?

like image 359
user3628807 Avatar asked Dec 19 '25 11:12

user3628807


1 Answers

For the first part

In newer versions of Netbeans , you can press Ctrl+Shift+I (Alt+Shift+I won't work as expected, though).

First, it searches for any smart or fully qualified instances in your file and then asks you of what types the found ones should be. It then adds fully qualified use statements to the top of your file and changes existing instances in the source to unqualified.

For the second part You have to use a plugin called Emmet

like image 160
l.g.karolos Avatar answered Dec 21 '25 02:12

l.g.karolos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!