fbpx

Line Wrapping in Nano Editor

There have been countless times in which I would like to copy a line in a file that I’m viewing using the nano editor. But, by default, the line continues off the terminal window, so anything that I select and copy will be limited to what’s visible within the window. And, I finally figured out a way to force line wrapping, which allows you to see the entire line within the terminal window rather than scrolling to the end of the line. There are two steps to enable line wrapping in nano.

Step 1: Press Esc

Esc

Press down the Escape button on your keyboard then let go.

Step 2: Press Shift + 4

Shift + 4

Press down Shift and 4 at the same time and then let go. It should enable line wrapping for your nano editor, so that you can now view your whole line within the terminal window. And, now, I can copy the full line within the window.

Leave a Reply

Your email address will not be published. Required fields are marked *