如何防止eclipse从XML和HTML文件中换行? [英] Howto prevent eclipse from line wrapping in XML and HTML files?

查看:271
本文介绍了如何防止eclipse从XML和HTML文件中换行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以完全阻止Eclipse从包装XML和HTML文件的行?这很容易做到这一点,即java文件,但是我找不到类似的XML和HTML文件设置。

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.

推荐答案

注意:eclipse中的单词/行包装是一个痛苦的主题,自2003年以来,由于这个大量投票 bug 35779

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

As Bozho 提到,只有 hard-包装(指定长度)

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

alt text http://www.openengsb.org/images/codingstyle/eclipse-xml-settings.png

提醒:



  • 只会扭曲文本右边的
    窗口边框没有添加新的行数(所以在启用它们时,
    数字列表中有空白)。

    此模式对于HTML等有用。

    一个很好的功能软包装是自动缩进的:如果行首开头有
    的空格,那么包裹的行会自动缩进相同金额的

  • 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.

将在您键入时添加和删除文字中的换行符,以平衡宽度。

在这里,您通常可以设置边距(例如80个字符)。

这对于README和其他将在终端中读取的东西很有用。

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.

这篇关于如何防止eclipse从XML和HTML文件中换行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆