Netbeans Word Wrap

This is post is now quite old and the the information it contains may be out of date or innacurate.

If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub

I love Netbeans, but there has been one bug bear that I just learned to deal with.

Files with very long lines (or even quite long lines) and Netbeans inability to line wrap.

Now though there is a possiblity to enable line wrapping. And its dead easy. And it works!

You can use word wrap in Netbeans.

Add the following to netbeans.conf (netbeans_installation_path/etc/netbeans.conf, by default /etc/netbeans.conf under linux):


to the sixth line so it looks like this:

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dorg.netbeans.editor.linewrap=true"

and restart Netbeans.

Set the Line Wrap option in Tools->Options->Editor->Formating.

Works fine for me in Netbeans 6.9

Tags: netbeanslinewordwrapidelong