This tutorial explains all the frequently used shortcuts and hotkeys for Netbeans.
This useful keyboard shortcut helps developers improve productivity and save time.
Shortcut Comment and uncomment code
Ctrl + /
in Windows,
Cmd
+ /
in Mac OS
the command used to comment on the code.
You can also use Ctrl
+ Shift
+ C
If you want to uncomment the code, Run the same command one more time.
shortcut key for collapsing/expanding a method in NetBeans
Shortcutkey | Description | MacOS |
---|---|---|
Collapse single a block or method | Ctrl + - | ⌘ + - |
Expand a single block or method | Ctrl + + | ⌘ + + |
Collapse All a blocks or methods | Ctrl + Shift + - | ⌘ + Shift +- |
Expand a All blocks or methods | Ctrl + Shift + + | ⌘ + Shift ++ |
Shortcut Keys to UPPERCASE and lowercase
Shortcutkey | Windows/Linux | MacOS |
---|---|---|
Upper Case | First, use Ctrl + U , next use U | First, use ⌘ + U , next use U |
Lower Case | First, use Ctrl + U , next use L | First, use ⌘ + U , next use L |
Reverse Case | First, use Ctrl + U , next use S | First, use ⌘ + U , next use S |
Netbeans File Shortcut keys
Parameter | Windows/Linux | MAC OS |
---|---|---|
New Project | Ctrl + Shift + N | ⌘ + Shift + N |
New File | Ctrl + N | |
Open New projects | Ctrl + Shift + O | |
Open Recent Project | Ctrl + Shift + T | |
Save | Ctrl + S | |
Save All | Ctrl + Shift + S | |
Print file | Ctrl + Alt + Shift + P |
Netbeans Edit Shortcut keys
Operation | Hot keys |
---|---|
Undo | Ctrl + Z |
Redo | Ctrl + Shift + Z |
Cut | Ctrl + X |
Copy | Ctrl + C |
Paste | Ctrl + V |
Paste from History | Ctrl + Shift + D |
Paste from Lines | Ctrl + Shift + L |
Find | Ctrl + F |
Replace | Ctrl + H |
Find in Projects | Ctrl + Shift + F |
Replace in Projects | Ctrl + Shift + H |
Netbeans Short-cut keys for Compile and Run
Operation | Hot keys |
---|---|
Run Project | F6 |
Test Project | Alt + F6 |
Build Project | F11 |
Clean & Build Project | Shift + F11 |
Other Shortcuts
Operation | Hot keys |
---|---|
Go to Line number | Ctrl + G |
Delete a Line | Ctrl + X or Ctrl + E |
Format | Alt + Shift + F |
Shortcut command to open a file
To open a file dialog, please run Alt + Shift + O
You can also use the Alt + F + O
option to open the file from the window file system. You can also use Ctrl + Shift + o
to open the file dialog.