Professional Documents
Culture Documents
Using NetBeans IDE On Mac OS X
Using NetBeans IDE On Mac OS X
Using NetBeans IDE On Mac OS X
https://netbeans.org/kb/articles/mac.html
NetBeans IDE NetBeans Platform Enterprise Plugins Docs & Support Community
Search
HOME / Docs & Support
Training
Java Programming
Language
For Mac OS X installation instructions, see the NetBeans IDE 8.0 Installation Instructions for Mac OS X.
Support
Oracle Development Tools
Support Offering for
NetBeans IDE
Documentation
Shortcuts on Mac OS X
The IDE has a default set of keyboard shortcuts that you can use to invoke functions. In some cases, the default
IDE shortcuts can conflict with default Mac OS shortcuts. In particular, some function keys used by the Mac OS
are known to conflict with some default IDE shortcuts. If you find that some keyboard shortcuts are not behaving
as expected, you can modify the shortcut for a particular IDE function by choosing NetBeans > Preferences
(Cmd-,) from the main menu and clicking Keyboard in the Options window. You can modify the default Mac OS
shortcut by opening System Preferences and clicking Keyboard & Mouse. For more, see the Apple Help topic
Using function keys on portable computers.
For a list of NetBeans' Source Editor keyboard equivalents on Mac OS X, see the following table:
Action
Cmd-[
Moves the insertion point to the highlighted matching bracket. Note that this
Sample Applications
Demos and Screencasts
shortcut only works when the insertion point is located immediately after the
opening bracket.
Cmd-Shift-[
Selects the block between a pair of brackets. Note that this shortcut only works
More
when the insertion point is located immediately after either the opening or
FAQs
closing bracket.
Contribute Documentation!
Ctrl-G
Cmd-A
Modifying Text
Keys
Action
Cmd-Shift-J
Opens the Internationalize dialog box that you can use to insert an localized
string at the insertion point.
Code Folding
1 of 4
5/17/16, 1:16 AM
https://netbeans.org/kb/articles/mac.html
Keys
Action
Cmd-Minus (-)
Collapses the block of code in which the insertion point is currently located.
Cmd-Plus (+)
Cmd-Shift-Minus (-)
Cmd-Shift-Plus (+)
Recording Macros
Keys
Action
Cmd-J then S
Cmd-J then E
Stops the recording of key sequence for a macro and opens the Recorded Macro
dialog enabling you to name the new macro.
Action
Cmd-Z
Cmd-Y
Cmd-X
Cmd-C
Cmd-V
Delete
Cmd-E
Cmd-K
Copies the word preceding the insertion point and then pastes it after the
insertion point (the insertion point must be in the whitespace preceeding or
following a word). Press K multiple times to cycle through preceding words in
succession.
Cmd-L
Copies the word following the insertion point and pastes it at the insertion point
(the insertion point must be located in the whitespace preceeding or following a
word.) Press L multiple times to cycle through consecutive following words.
Action
Cmd-G
Selects the next occurrence of the word found during the search.
Cmd-Shift-G
Selects the previous occurrence of the word found during the search.
Cmd-F
Cmd-R
Setting Tabs
2 of 4
5/17/16, 1:16 AM
https://netbeans.org/kb/articles/mac.html
Keys
Action
Tab
Shifts all text to the right of the insertion point one tab stop to the right.
Cmd-T
Shifts text in the line containing the insertion point to the right one tab stop.
Cmd-D
Shifts text in the line containing the insertion point to the left one tab stop.
Modifying Code
Keys
Action
Ctrl-Spacebar
Shift-Enter
Enters the text that is selected in the code completion box into your file.
Ctrl-I
Ctrl-Shift-I
Adds an import statement to the import section of the code when the cursor is
over the class name to be imported.
Shift-Spacebar
Using Bookmarks
Keys
Action
Cmd-F2
F2
Note:
For a complete list of NetBeans IDE keyboard equivalents, check the Keyboard Shortcuts Card by choosing Help
> Keyboard Shortcuts Card. Alternately, you can reference the Keyboard Shortcuts section of the NetBeans IDE
built-in Help.
You can access the Options window on Mac OS X by selecting NetBeans > Preferences (-,) in the main menu.
3 of 4
5/17/16, 1:16 AM
https://netbeans.org/kb/articles/mac.html
/NetBeans/etc/ directory, Control-click netbeans.conf, choose Open With from the contextual
menu, and select your preferred text editor. Then add the custom parameters you wish to use and save
your changes.
The netbeans.conf file can include the following entries:
netbeans_default_userdir: the default location and name of the userdir. Note that this entry is
only valid in the global configuration file. It cannot be redefined in the local netbeans.conf file,
because the launcher already needs to know the location of the userdir when the local
netbeans.conf file is being processed.
netbeans_default_options: any parameters passed to NetBeans or the JVM such as memory
configuration parameters, debugging options, --fontsize, various experimental switches, etc.
netbeans_jdkhome: the default location of the JDK to run NetBeans on. Note that this can be
overridden with the --jdkhome switch.
More Information
For more information, visit https://netbeans.org/.
You can also find news, articles, additional modules, and other useful information on the NetBeans project web
site. Since NetBeans is an open-source project, the web site also provides access to source code, a bug
database, information on creating your own NetBeans modules, and much more.
Feedback
If you encounter any Mac OS X-specific problems, please let us know by filing a bug, but don't forget to specify
that you are using the Mac OS X operating system.
You can also keep up to date on NetBeans IDE and interact with the NetBeans community by signing up for
NetBeans project mailing lists at https://netbeans.org/community/lists/.
SiteMap
About Us
Contact
By use of this website, you agree to the NetBeans Policies and Terms of Use. 2016, Oracle Corporation and/or its affiliates. Sponsored by
4 of 4
5/17/16, 1:16 AM