Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-23-2007, 01:31 PM   #1
Registered: Oct 2003
Location: Calgary, AB, Canada
Distribution: CentOS, Ubuntu
Posts: 32

Rep: Reputation: 0
Force nano to word wrap?

Running Debian etch 4.0r1 here.

I'm currently logged in as root to do some maintenance and need to edit some text files. I use nano as my editor. For some reason nano is ignoring the -r option to hard wrap the text.

From what I can gather online, nano will ignore wrapping when logged in as root. If this is the case can I force it to do the wrapping?

I've only used two editors when at the console - vi and nano... Perhaps I should be considering a different editor? (This machine does not use X, so I need a decent editor when logged into the console.)

Old 09-23-2007, 02:29 PM   #2
Senior Member
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Try emacs. That's also another good editor

You are right about the root not wrapping text in nano. I just tried it on my Ubuntu machine and it doesn't wrap!

Last edited by Micro420; 09-23-2007 at 02:33 PM.
Old 09-23-2007, 04:50 PM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 13,824

Rep: Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452
Interesting; I always use "-w" to ensure no wrap. I prefer to see it as it is in case there is something wrong - stray newlines can get lost in wrapped text.


nano, word, wrap

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
"enscript --word-wrap" does not wrap line of text file powah Linux - General 3 05-16-2006 10:12 PM
Microsoft Word won't word wrap Micro420 General 1 06-13-2005 05:36 PM
Setting Nano to wrap at 72 cols, fails macondo Debian 2 11-09-2004 01:18 PM
word wrap in java linux_ub Programming 3 08-11-2004 02:16 AM
Word Wrap Squall LQ Suggestions & Feedback 4 02-03-2004 04:25 PM

All times are GMT -5. The time now is 06:54 AM.

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