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.

  • 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

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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