LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2012, 01:09 PM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Correct word wrap in less


Hi!
Is there an option for less to use correct word wrap (so it'll wrap by words instead of symbols)?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-18-2012, 02:38 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Less on any install I've used wraps on long lines, and tries to find white-space
close to last column of the terminal to "wrap" the line.

Can you explain what exactly you mean? What exactly is the problem you're experiencing?


Cheers,
Tink
 
Old 03-19-2012, 01:47 AM   #3
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tinkster View Post
Can you explain what exactly you mean? What exactly is the problem you're experiencing?
http://www.hostpic.org/images/19scr_1332139461.png
See how "less" splits words?
 
Old 03-19-2012, 08:16 AM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tinkster View Post
Less on any install I've used wraps on long lines, and tries to find white-space
close to last column of the terminal to "wrap" the line.
I don't understand this statement. I just need words not to be splitted.
 
Old 03-19-2012, 03:38 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Sorry man ... I was having a completely senile moment ... of course less does exactly
what you describe.

You could write a wrapper for it (if arch doesn't supply one) that uses fold to
wrap lines for you before displaying them. less itself doesn't have any options to do
what you desire.
 
2 members found this post helpful.
Old 03-20-2012, 12:55 AM   #6
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Thanks! Fold does the job very well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML word wrap Johng Programming 8 11-14-2009 11:52 PM
variable length string using GD (word wrap, carriage return, word/character count)? frieza Programming 1 02-14-2009 05:21 PM
"enscript --word-wrap" does not wrap line of text file powah Linux - General 3 05-16-2006 09:12 PM
Microsoft Word won't word wrap Micro420 General 1 06-13-2005 04:36 PM
Word Wrap Squall LQ Suggestions & Feedback 4 02-03-2004 03:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration