views:

202

answers:

2

Hi,

is it possible to completely stop eclipse from line wrapping XML and HTML files? It is easy to do this i.e. for java files, but I couldn't find similar settings for XML and HTML files.

Thanks in advance.

A: 

Preferences > XML > XML Files > Editor, and set line-width there (Do accordingly for HTML, under Web > HTML files)

Bozho
A: 

Note: the word/line wrapping in eclipse is a "sore" topic, since 2003, as this massively voted bug 35779

As Bozho mentions, there is only hard-wrapping (at a specify length)

alt text

Reminder:

  • Soft will just warp the text at the right window border without adding new line numbers (so there are gaps in the list of numbers when you enable them).
    This mode is useful for HTML and the like.
    A nice feature of the soft wrap is automatic indentation: If there is whitespace at the beginning of the line, the wrapped lines are automatically indented by the same amount.

  • Hard will add and remove newlines in the text as you type to balance the width.
    Here, you can usually set a margin (80 characters, for example).
    This is useful for READMEs and other stuff that will be read in a terminal.

VonC