5

I am writing long lines of data to a text file using Python. But when I open the text file using gedit, I don't find that the lines that I wrote are displayed into one line each (i.e every line from the data that I wrote is divided into one or more lines in the file as shown in the photo).

screenshot with line wrap

What I want is to be able to scroll horizontally with gedit so that the lines that I write will be displayed in one line each.
Is it possible to scroll horizontally in gedit?

Zanna
  • 70,465
singrium
  • 6,880

1 Answers1

6

On the window bottom of gedit click on the Line number / Column number section:

gedit text wrapping.png

Uncheck the Text wrapping option and a horizontal scroll box will then appear. Lines will no longer be wrapped.


If you want the setting to be permanent change your preferences. Use: Edit => Preverences => View => Enable text wrapping:

gedit preferences menu.png


You can't access preferences if you are using sudo -H gedit though. You need to do this with regular user using gedit only. Then you can have sudo inherit your user preferences with a script such as this: How can I sync my root gedit with my user gedit's preferences?