Wednesday, September 15, 2010

In the Eclipse text editor, how can I reformat / fill / justify a paragraph to 80 characters wide?

Programmer Question

When editing text files in Eclipse, for instance, a README file, I have not yet found a way to get the editor to reformat paragraphs of text so that they fit in a reasonable width (typically 80 characters). This seems like it should be a very common thing to want to do, but I haven't found it. Can anyone help?



Note that I'm not talking about soft text wrapping here - I want to hit some key combination and have Eclipse insert and remove actual newline characters so that the file looks OK when viewed in a basic text editor. Essentially, the same thing that the 'fill-paragraph' function on Emacs does. I'm aware that certain specific source code editors has intelligent reformatters that work with comments, but the basic text editor doesn't seem to have anything.



If this doesn't exist I may have to go and write something myself...



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails