From 7b0b9a12ea9a9ff32f5d0a82b11f54df19ffb790 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 12 Jan 2020 12:09:09 +0100 Subject: [PATCH] docs: mention in the FAQ that auto-indentation is suppressed when pasting And that ^Js will be filtered out too. --- doc/faq.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/faq.html b/doc/faq.html index 95e70ac3..f3987390 100644 --- a/doc/faq.html +++ b/doc/faq.html @@ -193,9 +193,11 @@

4.5. How do I select text for or paste text from the clipboard when nano's mouse support is turned on?

Try holding down the Shift key and selecting or pasting the text as you normally would.

4.6. When I paste text into a document, each line gets indented further than the last. Why? And how can I stop this?

-

You have the autoindent feature turned on. Hit Meta-I to turn it off, paste your text, and then hit Meta-I again to turn it back on.

+

You have the autoindent feature turned on. Hit Meta-I to turn it off, paste your text, and then hit Meta-I again to turn it back on.

+

Update: Since version 4.8, nano will suppress auto-indentation during a paste, so you no longer need to toggle it off and on manually.

4.7. When I paste from Windows into a remote nano, nano rewraps the lines. What gives?

-

When pasting from Windows, in some situations linefeeds are sent instead of carriage returns (Enters). And linefeeds are ^Js, which make nano justify (rewrap) the current paragraph. To prevent these linefeeds from causing these unwanted justifications, add this line to your .nanorc on the remote Linux box: unbind ^J main or bind ^J enter main, depending on whether the paste contains CR + LF or only LF.

+

When pasting from Windows, in some situations linefeeds are sent instead of carriage returns (Enters). And linefeeds are ^Js, which make nano justify (rewrap) the current paragraph. To prevent these linefeeds from causing these unwanted justifications, add this line to your .nanorc on the remote Linux box: unbind ^J main or bind ^J enter main, depending on whether the paste contains CR + LF or only LF.

+

Update: Since version 4.8, nano will ignore linefeed characters in a paste, so you no longer need the above workaround.

4.8. I've compiled nano with color support, but I don't see any color when I run it!

If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Several example configurations are in the syntax/ subdirectory of the nano source, which are normally installed to /usr/local/share/nano/. To enable all of them, uncomment the line # include "/usr/local/share/nano/*.nanorc" in your nanorc. See also section 3.9.

4.9. How do I make nano my default editor (in Pine, mutt, etc.)?