How do you enable word-wrap by default in Eclipse?

旧巷老猫 提交于 2019-12-20 08:03:28

问题


Simple question: how do you enable word-wrap by default in Eclipse? I looked at this plugin but it only goes up to Luna. In addition, this plugin is a separate text editor and does not have syntax highlighting or validation. I'm open to other suggestions.


回答1:


Word wrap is available in Eclipse Neon IDE: https://www.eclipse.org/neon/noteworthy/#_word_wrap_in_text_editors.

Just consider using the latest version.

Shortcut: Alt+Shift+Y




回答2:


As pointed out by @KrisWebDev in this answer, Eclipse supports soft line/word wrapping as of Eclipse Neon but the GUI to control this setting does not exist yet. There should be a global settings to enable soft word wrapping by default in any text editor in Window > Preferences > General > Editors > Text Editors > Enable Wordwrap and it is not there.

Instead, you have to manually edit the org.eclipse.ui.editors.prefs file (.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs) in your eclipse workspace. There, you can add the settings wordwrap.enabled=true.



来源:https://stackoverflow.com/questions/39597007/how-do-you-enable-word-wrap-by-default-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!