Skip to content

Instantly share code, notes, and snippets.

@teocci
Last active July 1, 2016 05:20
Show Gist options
  • Save teocci/288edb8b89357be4da28acb3844d53b4 to your computer and use it in GitHub Desktop.
Save teocci/288edb8b89357be4da28acb3844d53b4 to your computer and use it in GitHub Desktop.

NetBeans IDE Keyboard Shortcuts I use the most

Initially for exploration of the features working with mouse may feel fancy but as you continue using the tool for project development and want to concentrate more on task in hand you start finding ways to do things faster. NetBeans IDE 6.1 provides many keyboard shortcuts if used judiciously they can save a lot of developers time.

I use certain shortcut keys more often than other keys. This is a list of the keyboard shortcuts for NetBeans IDE which I use in my day to day development tasks.

CTRL+F12 Navigate to Member

When my class becomes big and there are many methods in the class navigating to a specific method becomes easy with this dialog box.

alt text

As soon as I start typing the name of the desired method the dialog contents are filtered for me to select from matching method names starting from what I have typed.

alt text

SHIFT+ESC Toggle Editor Maximize/Minimize

I like working in the fully maximized editor window. SHIFT+ESC maximize the editor window for me and I can work with full concentration. When I need to see other windows I can again press SHIFT+ESC and I get the normal layout of windows back.

alt text

CTRL+7 Activate Navigator Window

When I am in maximized editor mode and I need to navigate to some method, either I choose the method 1 as described above or sometimes I use CTRL+7 to activate the navigator window. The windows other than editor in NetBeans follow a specific pattern, you can type characters and a quick search window appears which selects the most appropriate item from the window according to what is typed in this quick search window.

alt text

CTRL+/ Toggle Comment

For quick commenting of some lines I select those lines and press CTRL+/ to comment all those selected lines. The same lines can be uncommented again by following the same process.

alt text

ALT+SHIFT+F Format Code

This key combination formats my code to the standard Java Code Formatting template.

CTRL+0 Activate the Editor

When I am in the Navigator window through the shortcut CTRL+7 and I want to navigate back to the editor i press CTRL+0. I do not need mouse to do this navigation and save a lot of time in navigating between windows.

CTRL+# Activate different windows

These shortcuts are handy for navigating between the different windows. They become very important when I work in maximized editor mode.

  • CTRL+1 - Project Window
  • CTRL+2 - Files Window
  • CTRL+3 - Favorite Window
  • CTRL+4 - Output Window
  • CTRL+5 - Services window
  • CTRL+6 - Tasks Window

ALT+INSERT Generate Code

When I need to generate getter setters or constructors this key combination brings the Code Generation menu.

alt text

ALT+F7 Find Usages

Many a times I want to track all the occurrences of a particular method call. Who is calling my method. This Find Usages dialog comes handy in such times.

alt text

CTRL+F4 Close Editor Window and CTRL+SHIFT+F4 Close All Editor Windows

I use these keys often to close my editor windows and save many mouse clicks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment