5

I can get the effect that I want from running less -S but it seems fishy to me that there is no way to render the input without word-wrap after the file is opened.

Is there anyway to

less /tmp/longtext

And then after you have it up to disable wordwrap without exiting and restarting.

Evan Carroll
  • 28,578
  • 45
  • 164
  • 290

1 Answers1

8

Inside less, press - then S.

This technique is applicable generally in less: - will toggle the command-line option corresponding to the next key pressed.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164