Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

According to the man page for mc, the internal editor (mc -e) has a word wrap option. How can I turn this on? I have found settings in "Options" --> "General", however, this seems to only change text as it is typed in, and I cannot determine how to apply word wrap to text which has already been typed.

share|improve this question
1  
It seems more like a bug you should report to the developers. BTW, you can call the binary mcedit directly, and have a look at man mcedit instead. –  Teresa e Junior Jan 23 '12 at 7:06
    
To me it seems intentional. Neither changing the tab handling will replace all tabs in the existing text. Try the External formatter command from the Format or Command menu (depends on mc version) instead. That executes the ~/.mc/cedit/edit.indent.rc script. Or add a command to the User menu, to execute fold or fmt on a selection. –  manatwork Jan 23 '12 at 12:18
add comment

1 Answer

up vote 1 down vote accepted

mcedit's (or mc -e) word wrap is not like a regular word wrap in an editor. It is not just showing you a file with long lines wrapped so you can see the lines. Instead it actually and effectively creates new lines in your text file. It puts 'new-line' at the end of the lines and it alters your file.

As a proof, wrtie a couple of long lines in a file, than enable word wrap and let it wrap another couple or so lines. Save the file and than do a 'cat' of the file. You will see that it displays the lines wrapped.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.