How to wrap words/lines in NetBeans IDE 6.9.1?
Asked Answered
K

6

8

I searched for "wrap" in keyboard mappings without success. I don't see this option in menu neither.

EDIT: I was thinking about result the you get let's say in Notepad2 by pressing Ctrl+W (or selecting View -> Word Wrap). So I'am asking about toggling such Word Wrap

Katiekatina answered 15/11, 2010 at 15:15 Comment(1)
can you please mark @Peter Nore as the correct answer ?Bridgeport
T
6

Are you talking about "soft wrapping"? That is, there are no line breaks inserted into the text file, but each line is wrapped to fit in the editor window?

NetBeans doesn't support that. Hard to believe, I know. I think it might be coming in the 7.0 version, I'm not sure.

Telex answered 19/11, 2010 at 23:49 Comment(1)
Yes, I mean that kind of wrapping. Wow. I am really shocked!Katiekatina
B
27

In Tools->Options there is a whole section on line wrapping. The options you choose here will depend on how you need to do the wrapping - it is quite configurable.

  1. Go to Tools->Options.
  2. Click on Editor in the ribbon at the top.
  3. Choose the formatting tab.
  4. Choose the language you require the wrapping for it the Language combobox.
  5. In the Category, choose Wrapping.
  6. Configure how you would like the wrapping to take place.

Hope this helps...

Barbados answered 15/11, 2010 at 16:4 Comment(2)
I was thinking about result the you get let's say in Notepad2 by pressing Ctrl+W (or selecting View -> Word Wrap). So I'am asking about toggling such Word Wrap.Katiekatina
Are there certain versions where the Wrapping category isn't available? On Netbeans 6.9.1 on Linux, Tabs and Indents is actually the only thing available from the "Category" drop down.Nessy
N
8

Stolen from Sidarta's tip in this SO post:

You can use word wrap in Netbeans.

Add to netbeans.conf (netbans_instalation_path/etc/netbeans.conf):

-J-Dorg.netbeans.editor.linewrap=true and restart Netbeans.

In Options->Editor->Formating there is Line Wrap dropdown option

Works fine for me in Netbeans 6.9

Nessy answered 20/11, 2010 at 21:12 Comment(0)
T
6

Are you talking about "soft wrapping"? That is, there are no line breaks inserted into the text file, but each line is wrapped to fit in the editor window?

NetBeans doesn't support that. Hard to believe, I know. I think it might be coming in the 7.0 version, I'm not sure.

Telex answered 19/11, 2010 at 23:49 Comment(1)
Yes, I mean that kind of wrapping. Wow. I am really shocked!Katiekatina
C
3

Since Netbeans 7, word wrap is available. See this blog for directions:

Netbeans & Wordwarp

Casady answered 12/1, 2012 at 20:38 Comment(0)
L
3

As Daniel says, after Netbeans 7 this is possible. Just go to your NetBeans options and select the editor tab. In languages (dropdown) selection choose "all languages". Then you will see the option Line Wrap. Change it to "After Words" or "Anywhere".

enter image description here

Lazos answered 26/1, 2014 at 21:57 Comment(1)
a picture is worth a thousand wordsNicollenicolson
R
0

Go to toolbar-> option ->Editor(Tab)

view this picture..

soft wrap in netbean

select your line wrap 'after words' .

after apply these settings. you will see the code responsive way. you don't need to scroll horizontal to see code.view the picture for resutl.

soft wrap in netbean

Ruddock answered 25/3, 2015 at 3:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.