A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label wrap. Show all posts
Showing posts with label wrap. Show all posts

Terminal does not wrap properly in linux

Sometimes lines don't wrap correctly in a bash terminal in linux - long lines overlap and overwrite the beginning of the line instead of continuing onto the next line.

To fix it:
shopt -s checkwinsize

To check it:
shopt  | grep checkwinsize
You should see:
checkwinsize    on

If it still isn't working, try:
reset

(source)

Allow PRE text to wrap on Confluence wiki


Add this to the wiki code:


{html}
<style type="text/css">
/* Allow PRE elements to wrap --- better than manually adding ad-hoc
 * linebreaks because
 * (a) It's automatic
 * (b) It adapts to the window width
 * (c) People can still copy-and-paste from the browser window and get the
 * original long lines
 */
pre {
 white-space: pre-wrap; /* css-3 */
 white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
 white-space: -pre-wrap; /* Opera 4-6 */
 white-space: -o-pre-wrap; /* Opera 7 */
 word-wrap: break-word; /* Internet Explorer 5.5+ */
}
</style>
{html}

Thanks duckbill