The word wrap and selection wrap support in Eclipse leaves a bit to be desired. The biggest problem for me is that I can’t remember how to do even do it in a default install. I think there’s something in the editor config but it’s difficult to find and I always forget where it is.

I recently found this script for Wrapping Text using Eclipse Monkey. It’s some simple javascript that does hard wrapping around a certain number of characters per line. It pays attention to words and will insure that your lines never go beyond a particular column width.

This solution works for my particular needs of having to past in some content from Firefox into html files in Eclipse. Firefox doesn’t pay attention to the line brakes in the copying process so I end up getting some huge, ugly looking lines in Eclipse. For html output, the hard wrap of lines, with a return after each line is fine. If you’re using the CFEclipse plugin for Eclipse, there’s an icon in the tool bar that allows for soft wrapping of the text. This is really the best way to go for non-destructive wrapping. But that does assume you’re using CFEclipse and in that view. Outside of that, this script using the Eclipse Monkey plugin is a big help.

Eclipse Monkey, Project Dash is sweet. It basically allows you to build plugins into the Eclipse interface using javascript, offering clean menu integration and hotkey support right out of the box. I’ve spent all of 10 minutes thusfar with Eclipse Monkey, have installed this word wrap script and already have some other ideas of scripts I could pull off quickly.