I've been using Netbeans for longer than I care to admit. I use it almost everyday for Java and JavaScript development. Here are some small tweaks I use to make Netbeans a little easier to use.
When I first started using Netbeans, there was an option to select a project as a "Main Project". Visually, the main project is highlighted in bold in the Projects
tree. When you have a main project selected, the build buttons in the main toolbar will apply to the selected project.
Newer versions of Netbeans don't have a "Set as Main Project" menu option when you right click on a project in the Projects
tree.
To re-enable this feature, simply go to Run
-> Set Main Project
-> Select a project
Newer versions of Netbeans have inline hints enabled by default, which I find really annoying.
To disable inline hints, simply go to View
-> Show Inline Hints
Personally, I don't like having whitespaces at the end of a line of code or empty lines of code with whitespaces. It really makes a mess when reviewing commits in git.
To trim whitespaces on save, go to Tools
-> Options
-> Editor
-> On Save
- Select Language (or All Languages)
- Remove Trailing Whitespace select
All Lines
Personally, I usually end up with a lot of tabs open when I'm coding. Switching between tabs can be a pain when the tabs overflow. Instead you can render the tabs horizontally.
Tools
-> Options
-> Appearance
-> Tab Placement
-> Right
If you're on Windows you may run into an issue with the clipboard in newer versions of Netbeans. There are multiple tickets for this issue but as of this post, there is no out-of-the-box fix. However, there is a workaround that works for me.
In the Netbeans installation folder look for a file called netbeans.conf
. In there, there is a setting called netbeans_default_options
. I recommend adding -J-Dnetbeans.slow.system.clipboard.hack=false
to the list of args like this: