Reputation: 2946
How to change caret (cursor) blinking rate in NetBeans? (7.0)
NetBeans developers say that this is supported as a Swing option, see Bug 124211 - Cursor blink rate too fast but I can't figure out the name of this Swing option to set from the command line.
The closest example of setting Swing option that I found is setting look and feel by putting
-J-Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
to the netbeans.conf.
Upvotes: 9
Views: 10771
Reputation: 2177
If you would like to disable it for all editors, instead of just the Java editor, add the following:
<entry javaType="java.lang.Integer" name="caret-blink-rate" xml:space="preserve">
<value>2147483647</value>
</entry>
under the <editor-preferences>
element to the file:
config/Editors/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml
The full paths are:
On Mac:
~/Library/Application Support/NetBeans/8.2/config/Editors/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml
On Windows:
%APPDATA%\NetBeans\8.2\config\Editors\Preferences\org-netbeans-modules-editor-settings-CustomPreferences.xml
Source: https://forums.netbeans.org/topic9561.html
Upvotes: 3
Reputation: 6105
I realize this is old, but it's quite high up in google search so I thought I'd add an updated solution. The solution above by Tushar Joshi does not work for me in Netbeans 7.1.1. What I had to do, was quite similar though:
Basically, the setting have moved to <userdir>\config\Editors\text\x-java\Preferences\org-netbeans-modules-editor-settings-CustomPreferences.xml
.
The path for Unix/Linux is $HOME/.netbeans/<NetbeansVersion>/config/Editors/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml
.
Exit netbeans and modify the file by adding the entry
<entry javaType="java.lang.Integer" name="caret-blink-rate" xml:space="preserve">
<value>1000</value>
</entry>
The value
is the number of milliseconds of blink rate. I added a whole second. I added it so it lined up alphabetically with the other name properties of the other entries, but I don't know if that's important or not. That's it:)
Upvotes: 20
Reputation: 2224
There was a module for customizing the Cursor Blinking Rate created by Emilian Bold, but that module is not found easily available. Let me provide a less intuitive way but this solution works with NetBeans IDE 7.0.1 as tested by me.
Make sure the NetBeans IDE is shut down before making these changes.
Create file <userdir>/config/Editors/text/x-java/properties.xml
Here the <userdir>
means the User directory used by NetBeans IDE. This directory can be found from the NetBeans Help > About menu. The config
folder will already be there in this directory but the folders Editors/text/x-java
may not be there and we will have to create them, they are case sensitive. The properties.xml
file shall also be created in the x-java
folder.
Add the following contents to the properties.xml
file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties PUBLIC "-//NetBeans//DTD Editor Properties settings
1.0//EN" "http://www.netbeans.org/dtds/EditorProperties-1_0.dtd">
<properties>
<property class="java.lang.Integer" name="caret-blink-rate" value="0"/>
</properties>
The value="0" portion can be customized by desired blink rate in miliseconds, the default value used by NetBeans IDE is 300 in my opinion, but it can be changed with a new value, 0 will mean no blinking.
Start NetBeans IDE again and now you will get your desired blink rate for the cursor in Java files.
Upvotes: 7