Turn off line wrap in Gedit

9

2

I've been using kwrite for a long time and love the way I can turn on/off line wrapping easily. Now I'm running Ubuntu with GNOME, trying to avoid any KDE at all on this particular machine. Gedit seems to always wrap lines with no way to turn it off. Am I missing some well-hidden option?

DarenW

Posted 2011-03-06T03:48:53.563

Reputation: 1 707

Answers

14

Edit > Preferences > View Tab > Text Wrapping options right there, front and center. Not "well hidden" by any means.

Joshua

Posted 2011-03-06T03:48:53.563

Reputation: 4 290

3That seems a bit deep for turning on and off routinely. Kwrite has it immediately available in the menu bar's View. – DarenW – 2011-03-06T04:21:27.627

It's be nice if there were a hotkey for that. – DarenW – 2011-03-06T15:33:02.913

1Get the source code and make the change yourself. Great opportunity to learn. :) – Joshua – 2011-03-07T05:34:40.697

5

UPDATE:

In 3.14.3 (and perhaps earlier) and in newer versions of gedit, there is a "Text wrapping" checkbox when you click on the "Line/Column" indicator on the status bar, in bottom right corner of the window.


IN VERY OLD VERSIONS:

As of gedit 10.4, there is no preferences dialog anymore. Some of the options are now in the status bar, but not word-wrapping.

You can turn word wrapping off by tweaking the GSettings settings. To do so, run the following command in your terminal:

gsettings set org.gnome.gedit.preferences.editor wrap-mode none

Besides none, you can also turn it back on with either word, char, or word-char word wrapping.

istepaniuk

Posted 2011-03-06T03:48:53.563

Reputation: 160

Is there a shortcut for enabling and disabling wrapping? – htellez – 2015-12-28T22:25:50.763

3@htellez my current gedit (3.16.2) has a "Text wrapping" option if you click on the right part of your status bar (where Ln, Col. numbers are) – istepaniuk – 2016-01-08T13:27:33.647

Thanks @istepaniuk. I don't see such an option and I'm using 3.10.4. Could you share a screenshot? I would prefer a 'no mouse' way to do it, is always faster using keyboard shortcuts than using the mouse and I have been wrapping/unwrapping a lot lately. – htellez – 2016-01-08T19:26:19.037

Sorry I didn't noticed your gedit version was higher than mine until now. Anyway, do you know if there is a way to make a keyboard shortcut MACRO with it? – htellez – 2016-01-11T21:27:56.923

1in 3.14.3 there also is a "warp" checkbook if you click the "Ln .., Cl .." bar at the bottom, thank you @istepaniuk – MInner – 2016-10-05T14:55:16.530

-1

When running as root there is no Preferences menu

By default when you run gedit as root there is no top level menu. The only alternative (in my version 3.18.3) is to click on the last drop down menu on the lower right corner:

gedit text wrap.png

Notice I have "unchecked" text wrap option to make /var/log/syslog file more readable for debugging output.

WinEunuuchs2Unix

Posted 2011-03-06T03:48:53.563

Reputation: 147