When I view this IRC log in Firefox, long lines do not wrap. But I wish they would! Anyone know how to make Firefox word-wrap text/plain files?

  • this file is served as gzipped plain text; try HEAD http://ci.mifos.org/irclogs/%23mifos/archive/2010/2010-01-04.log.gz and you should see Content-Type: text/plain
  • when the same resource is viewed in Google Chrome, long lines wrap
  • this might be a related question on doctype, but the "accepted answer" contains a broken link
  • this didn't work for me (even the alternate version using pre-wrap as opposed to -moz-pre-wrap mentioned in a comment by user "Idran")
  • using "View → Page Source", then toggling word wrap is a suitable workaround
link|improve this question
feedback

3 Answers

up vote 6 down vote accepted

The Toggle Word Wrap Firefox extension might work for you.

link|improve this answer
1  
Yes, that works! I noticed that plugin, but I dismissed it since the description only mentions PRE tags and HTML, so I assumed it wouldn't work for text/plain documents. Thank you! – Adam Monsen Aug 13 '10 at 22:35
I did that too. That is, dismissed the add-on because it focused on PRE tags. Thanks Dan! – progo Nov 27 '10 at 15:18
feedback

If you just need to wrap plaintext files, try Ctrl-U (then View -> Wrap Long Lines, if not already checked). This solution is cleaner than an add-in with plaintext files, but sloppier with text embedded in html.

link|improve this answer
feedback

Go to the Firefox User Profile.

Firefox User Profile Folder --> Chrome -- > userChrome.css (If this file is not present, make a copy of userChrome-example.css and rename it!

Add to the bottom:

pre { white-space: pre-wrap !important; }

Save the file.]

Restart Firefox. Works with Firefox 3.6 AND 4

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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