Netbeans shortcuts - the most important keyboard shortcuts
Netbeans is the smart and fast way to encode desktop, mobile and web apps. We will introduce you to the most important key combinations and shortcuts in this article.
Shortcut 1: Netbeans clipboard
With certain key combinations you can quickly fill or empty the clipboard.
- If you do not select a character or word, [Ctrl] + [C] copies the entire line to the clipboard.
- With [Ctrl] + [V] you can paste the previously copied source text from the clipboard.
- Practical: [Ctrl] + [V] + [Shift] formats the copied text directly after the import.
Shortcut 2: Delete using a key combination
- You can of course first delete using the (context) menu or the [Del] key.
- However, if you want to delete an entire line, you can do this with the key combination [Ctrl] + [E] without having to mark the line.
Shortcut 3: Comment out in Netbeans
If you want to remove a line from the program flow but do not want to delete it, the following shortcut helps:
- With [Ctrl] + [Shift] + [C] you can activate the "Toggle Comment" command to quickly comment out selected lines or to remove the comments.
Shortcut 4: Move lines with a key combination
With the right keyboard shortcuts, you can easily move, move, and indent lines.
- Use the arrow keys and [Alt] + [Shift] to move the current or selected lines up or down, or to move them in or out.
Shortcut 5: Rectangular selection in the Netbeans editor
In addition to the classic character and line selection, the text editors now also have a rectangular selection (checked for v. 7.1).
- First press [Ctrl] + [Shift] + [R] to activate the rectangular selection (Note: The same combination also deactivates the selection).
- You can now mark a rectangular area in the source code with the mouse or the arrow keys in combination with [Shift].
- You can now delete or copy the selected text in the area, but also replace it by entering new data.
Shortcut 6: Fast formatting in Netbeans
Quickly formatting something is important to restore structure and order. It works like this:
- With [Ctrl] + [Shift] + [F] you can reformat everything (if the selection is missing) or the selected area.
Shortcut 7: Netbeans hyperlinks for classes, methods and fields
Even various hyperlinks can be set quickly and easily using a simple key combination.
- Hold the [Ctrl] key and move the mouse pointer over a name - method, field or class name.
- Now a hyperlink appears, which you can click and jump to the declaration. The declaration may open a new editor.
Shortcut 8: Jump to line number with key combination
With the next shortcut you can quickly navigate through the different lines.
- With [Ctrl] + [G] and the command "Goto Linenumber" you can open a dialog and then enter a line number there.
- After clicking the confirmation button, the cursor automatically jumps to the specified line.
Shortcut 9: Search class in Netbeans
- Start the search dialog for class names with [Ctrl] + [O] (command "Goto Type").
- Now enter a search term in the dialog and double-click on one of the results to open the file.
- [Ctrl] + [Shift] + [1] displays this file in the project structure.
Shortcut 10: Maximize editor in Netbeans
For many, the editor is too small - you can maximize the editor by double-clicking on the respective tab, but you can also save yourself the laborious click.
- Here the shortcut [Ctrl] + [ESC] helps to quickly enlarge the window. You can close the tab again by entering the combination again.
Netbeans: Problems with keyboard shortcuts and shortcuts
Just as the above keyboard shortcuts can make your life easier, you will quickly lead to problems and complications for some users - the following basic problems are known:
- Shortcuts that are introduced with [Alt] + [Shift] or [Alt] + [Shift] do not work on Ubuntu systems. The system already uses [Alt] + [Shift] as an abbreviation. You can easily change these shortcuts under "Tools", "Options" and "Keymap".
- German users, or at least those with a German key layout, will quickly notice that the common shortcuts introduced by [Shift], [Shift] or [AltGr] such as commas, semicolons, asterisks or brackets collide with the key combinations for Netbeans. Adjust the abbreviations accordingly under "Tools", "Options" and "Keymap".
In another article, we present Netbeans-like and good compilers for C and C ++.
$config[ads_text5] not found