Word wrap mode of "less" viewer is disabled by default in the system I work on. According to "less" viewer help, it is disabled with -S or --chop-long-lines flags. I did not find how to force word wrap on my system. Is there any known flag, or any other way, for enabling the mode?
how to turn on word wrap in linux less viewer? [closed]
You may try using the LESS
environment variable. For example, you can put the following into system-wide shell initialization script (/etc/profile
for bash/ksh):
export LESS="-S "
thanks. solved. when i do echo "$LESS" i see "-i-S-q-u-R". That's why word wrap is disabled by default. –
Original
Word wrapping is disabled using -S
. Following the man page, you can reset that option by passing -+S
to the command line.
Let's say you have $LESS
set to -S
, you can re-enable it on the command line with
less -+S file
Great tip for a plus sign! –
Buhl
You may try using the LESS
environment variable. For example, you can put the following into system-wide shell initialization script (/etc/profile
for bash/ksh):
export LESS="-S "
thanks. solved. when i do echo "$LESS" i see "-i-S-q-u-R". That's why word wrap is disabled by default. –
Original
© 2022 - 2024 — McMap. All rights reserved.
force word wrap on my system
? – Gervais