Is there a way to change the editor's line height in Netbeans without resorting to redundant newlines?
For netbeans 7.2.x on Windows 7, the location is slightly different (but can be found without too much digging).
%USERPROFILE%\AppData\Roaming\NetBeans\7.2.1\config\Editors\Preferences\org-netbeans-modules-editor-settings-CustomPreferences.xml
And then, as others have mentioned, above, add the following at the end (but before the </editor-preferences>
closing tag:
<entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve">
<value><![CDATA[1.5]]></value>
</entry>
Note that here, the actual line-spacing value is 1.5
which means 1.5 x the default line-spacing, i.e.: 150%.
Expanding on gulbandr's answer:
For Netbeans 6.8 and above on Windows, change some arbitrary setting under "Tools/Options/Editor" to trigger the creation of a configuration file. It gets created at
%USERPROFILE%\.netbeans\6.8\config\Editors\Preferences\org-netbeans-modules-editor-settings-CustomPreferences.xml
Then add the following lines into the <editor-preferences>
element:
<entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve">
<value><![CDATA[1.5]]></value>
</entry>
The file org-netbeans-modules-editor-settings-CustomPreferences.xml can be found in {install_dir}\ide\config\Modules
. If it’s not there, change any editor settings in NetBeans IDE, and it’ll create it.
Open this file in your favourite text editor, and add the following code right before the last line (right before the </editor-preferences>
tag):
<entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve">
<value><![CDATA[0.7]]></value>
</entry>
Then restart NetBeans.
-
-
-
gulbandr's answer worked as expected in Netbeans 7.1.1 in Mac OSX Lion. – Santhosh Jul 17 '12 at 7:18
-
If on Mountain Lion for NetBeans >= 7.2.1 you fail find the file org-netbeans-modules-editor-settings-CustomPreferences.xml in the suggested directory, have a look in ~/Library/Application Support/NetBeans/7.2.1/config/Editors/Preferences – Cummander Checkov Jan 27 '13 at 12:59
Within the Fonts & Colors
tab, try adjusting the Whitespace
field to 20~25px.