Sunday, February 14, 2010

Paste into terminal End Of LiNe problem

Sometimes, when you SSH to a Linux box, pasting large amounts of text into a terminal can be problematic.

In pico/nano you will get some auto wrapping that could damage your code or outline your text.

To fix this you can use: nano -w yourfile.txt

-w (--nowrap)
Disable wrapping of long lines.

In vi/vim you can get a "staircase" effect.
To fix this, in command mode, type:

:set paste

to turn it back off:

:set nopaste

No comments: