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

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.


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

Keyboard shortcut: Alt+Shift+Y

Or button:

enter image description here

Or menu Window > Editor > Toggle Word Wrap:

enter image description here

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

Solution 3:

For windows this worked for me(change workspace6 if not works), open settings file

%APPDATA%\DBeaverData\workspace6\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.editors.prefs

add

wordwrap.enabled=true