100+ Netbeans Shortcuts
4 min read
image source apache
Today we are going to talk about useful shortcuts provided in Netbeans. Netbeans shortcuts makes the task easier and helpful for the developers
Features of Netbeans
Fast & Smart Editing
Apache NetBeans is far quite a text editor. It highlights ASCII text file syntactically and semantically, allows you to easily refactor code, with a variety of handy and powerful tools.
Java, JavaScript, PHP, HTML5, CSS, and More
Apache NetBeans provides editors, wizards, and templates to assist you create applications in Java, PHP and lots of other languages.
Cross-Platform
Apache NetBeans are often installed on all operating systems that support Java, i.e, Windows, Linux, Mac OSX and BSD. Write Once, Run Anywhere, applies to NetBeans too.
NetBeans Shortcuts
1. General Keyboard Shortcuts | |
---|---|
Ctrl+F3 | Search word at the insert point |
F3/Shift+F3 | Find next/previous in file |
Ctrl+F/H | Find/Replace in a file |
Alt+F7 | Find usages |
Ctrl+Shift+F/H | Find/replace in projects |
Alt+Shift+U | Find usages results |
Alt+Shift+H | Turn off search result highlights |
Ctrl+R | Rename |
Ctrl+U, then U | Convert selection to uppercase |
Ctrl+U, then L | Convert selection to lowercase |
Ctrl+U, then S | Toggle case of selection |
Ctrl+Shift+V | Paste formatted |
Ctrl+Shift+D | Show Clipboard History |
Ctrl+I | Jump to the quick search field |
Alt+Shift+L | Copy file path |
Ctrl+O/Alt+Shift+O | Go to type/file |
Ctrl+Shift+T | Go to JUnit test |
Ctrl+Shift+B | Go to source |
Ctrl+B | Go to declaration |
Ctrl+G | Go to line |
Ctrl+Shift+M | Toggle add/remove bookmark |
Ctrl+Shift+./, | Next/previous bookmark |
Ctrl+./, | Next/previous usage/compile error |
Alt+Shift+./, | Select next/previous element |
Ctrl+Shift+1/2/3 | Select in Projects/Files/Favorites |
Ctrl+[ | Move caret to matching bracket |
Ctrl+K/Ctrl+Shift+K | Next/previous word match |
Alt+Left Arrow/Alt+Right Arrow/Ctrl+Q | Go backward/forward/to the last edit |
Alt+Up Arrow/Down Arrow | Next/previous marked occurrence |
2. Coding in C/C++ | |
---|---|
Alt+Shift+C | Go to declaration |
Ctrl+F9 | Evaluate expression |
3. Coding in Java | |
---|---|
Alt+Insert | Generate code |
Ctrl+Shift+I | Fix all class imports |
Alt+Shift+I | Fix selected class’s import |
Alt+Shift+F | Format selection (Indent) |
Alt+Shift+Arrow Keys | Shift lines left/right/up/down |
Ctrl+Shift+R | Rectangular Selection (Toggle) |
Ctrl+Shift+Arrow Up/Arrow Down | Copy lines up/down |
Ctrl/Alt+F12 | Inspect members/hierarchy |
Ctrl+Shift+C/Ctrl+/ | Add/remove comment lines |
Ctrl+E | Delete current line |
4. Java Editor Code Templates | |
---|---|
Type shortcut and press Tab | |
psvm | public static void main |
En | Enumeration |
Ex | Exception |
Psf | public static final |
Psfb | public static final boolean |
Psfi | public static final int |
Psfs | public static final String |
St | String |
ab | abstract |
as | assert true |
br | break |
bo | boolean |
ca | catch |
cl | class |
cn | continue |
db | double |
df | default |
eq | equal |
ex | extends |
pu | public |
pr | private |
pe | protected |
th | throws |
fy | finally |
im | implements |
ie | interface |
tw | throw |
ir | import |
le | length |
sout | System.out.println() |
soutv | System.out.println(“obj”+obj) |
wh | while |
vo | volatile |
iof | instanceof |
fi | final |
fl | float |
fa | false |
sh | short |
psf | private static final |
psfb | private static final boolean |
psfi | private static fianl int |
psfs | private static final String |
pst | printStackTrace() |
bcom | /**/ |
5. JSP Editor Code Templates | |
---|---|
Type shortcut and press Tab | |
al | windows.alert() |
br | break; |
fun | function${name}… |
hi | windows.history |
dw | document.write() |
eq | ${}equals |
fa | ${}false |
lo | ${}windows.location |
re | ${}return |
Win | $()window |
ca | ${}caseCatch() |
catch | catch |
cond | windows.consoledebug() |
coni | windows.console.info() |
conl | windows.console.log() |
conw | windows.console.warn() |
ct | ${}catch |
do | ${}document |
iof | ${}instanceof |
6. Compiling, Testing, and Running | |
---|---|
F9 | Compile package/ file |
F11 | Build the main project |
Shift+F11 | Clean and build the main project |
Ctrl+Q | Set request parameters |
Ctrl+Shift+U | Create Unit test |
Ctrl+F6/Alt+F6 | Run Unit test on file/project |
F6/Shift+F6 | Run main project/file |
7. Opening and Toggling between Views | |
---|---|
Ctrl+Tab (Ctrl+`) | Switch between open documents by order used |
Shift+Esc | Maximize window (toggle) |
Ctrl+F4/Ctrl+W | Close selected window |
Ctrl+Shift+F4 | Close all windows |
Shift+F10 | Open contextual menu |
Ctrl+Page Up / Page Down | Switch between open documents by order of tabs |
Ctrl+Alt+T | Reopen the recently closed file |
Ctrl+Alt+Page Up / Page Down | Toggle between editor types |
Alt+Mouse Wheel Up / Down | Zoom text in / out |
Ctrl+Shift+S | Toggle Inspect Mode |
8. Debugging | |
---|---|
Ctrl+F5 | Start debugging the main project |
Ctrl+Shift+F5 | Start debugging current file |
Ctrl+Shift+F6 | Start debugging test for file |
Shift+F5/F5 | Stop/Continue debugging session |
F4 | Run to cursor location in a file |
F7/F8 | Step into/over |
Ctrl+F7 | Step out |
Ctrl+Alt+Up | Go to the called method |
Ctrl+Alt+Arrow Down | Go to the calling method |
Ctrl+F9 | Evaluate expression |
Ctrl+F8 | Toggle breakpoint |
Ctrl+Shift+F8 | New breakpoint |
Ctrl+Shift+F7 | New watch |
this were Netbeans shortcuts provided in the platform.
To download Netbeans click here to download