How to Change Editor Line Height in NetBeans IDE?

Unlike IntelliJ Idea, the NetBeans IDE does not have a direct option in the settings window to set the preferred line height of the editor. If you want to adjust the editor line height in NetBeans, you can still do it by adding an entry to a preferences file.

The file you have to modify is org-netbeans-modules-editor-settings-CustomPreferences.xml. Depending on your operating system and version, the location of the NetBeans Preferences folder may vary. Typically, the Preferences folder is located in the user’s home directory at ~/.netbeans/<version>/config/Editors/Preferences (e.g. ~/.netbeans/18/config/Editors/Preferences).

On MacOS Ventura (13.5) NetBeans (v18) preferences config is located at: ~/Library/Application Support/NetBeans/18/config/Editors/Preferences.



Open ~/Library/Application Support/NetBeans/18/config/Editors/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml and add the following lines to specify the line height:



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE editor-preferences PUBLIC "-//NetBeans//DTD Editor Preferences 1.0//EN" "http://www.netbeans.org/dtds/EditorPreferences-1_0.dtd">
<editor-preferences>
  <entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve"> <value><![CDATA[1.2]]></value> </entry>
</editor-preferences>

If the file org-netbeans-modules-editor-settings-CustomPreferences.xml already exists, just add the entry to the file.

How to Change Editor Line Height in NetBeans IDE?
Be The First

Join our list to get instant access to new articles and weekly newsletter.

Tagged on:         
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x