Howto prevent eclipse from line wrapping in XML and HTML files?

后端 未结 3 1080
南旧
南旧 2020-12-17 08:26

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

3条回答
  •  死守一世寂寞
    2020-12-17 09:19

    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 http://www.openengsb.org/images/codingstyle/eclipse-xml-settings.png

    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.

提交回复
热议问题