Eclipse有线包装 [英] Does Eclipse have line-wrap

查看:170
本文介绍了Eclipse有线包装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse IDE编辑XML文件,需要输入文本段落。似乎没有eclipse有一个换行功能。任何人都知道是否这样做,或者是否有插件?

I'm editing an XML file with the Eclipse IDE and need to input paragraphs of text. It doesn't seem that eclipse has a line-wrap feature though. Anyone knows if it does or if there's a plugin for that?

推荐答案

正如VonC在这篇文章中所提到的那样同一页。 Eclipse现在具有06-06 Neon的这一功能。

尝试这个插件 Eclipse平台插件

看起来eclipse只能自己手动执行,这里是命令。在这一点上,您必须手动重新格式化突出显示的文本。

It looks like eclipse only has the ability to do it manually on its own and here are the commands. At that point you must reformat the highlighted text manually.

如何在Java源文件中控制Eclipse线宽和换行不是很明显。以下是如何和在哪里:

It's not terribly obvious how to control Eclipse line width and line wrapping in your Java source files. Here's how and where:

注释宽度和换行在 Preferences-> Java->代码样式 - > Formatter ,然后单击编辑按钮,然后选择评论选项卡。我喜欢评论的行宽为120.

Comment width and line wrapping is set in Preferences->Java->Code Style->Formatter, then click on the Edit button and select the Comments tab. I like Line Width for Comments to be 120.

代码行换行设置在附近,首选项 - > Java->代码样式 - >格式化器,然后单击编辑按钮并选择行包装选项卡。我喜欢线宽为120,缩进大小为4.

Code line wrapping is set nearby, in Preferences->Java->Code Style- >Formatter, then click on the Edit button and select the Line Wrapping tab. I like a line width of 120 and indent size of 4.

缩进是单独设置的,在 Preferences-> Java->代码样式 - > Formatter ,然后单击编辑按钮,然后选择缩进选项卡。我喜欢4的缩进大小,符合Line Wrapping缩进设置。

Indentation is set separately, in Preferences->Java->Code Style- >Formatter, then click on the Edit button and select the Indentation tab. I like an indent size of 4, consistent with the Line Wrapping indent setting.

如果这还不够,您还可以在首选项>常规>编辑器>文本编辑器中设置打印机边距,选项卡大小等。 code>我将显示选项卡宽度设置为4,将打印边距列设置为120或更多。

As if that's not enough, you can also set printer margins, tab size, etc, in Preferences>General>Editors>Text Editors where I set the Displayed Tab Width to 4 and Print Margin Column to 120 or more.

您还可以查看显示打印边距框以在打印机边距列上获得微弱的垂直线

You can also check the Show Print Margin box to get a faint vertical line at the printer margin column

这篇关于Eclipse有线包装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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