help-nano
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-nano] Disable justify on ^J


From: Yves Goergen
Subject: [Help-nano] Disable justify on ^J
Date: Sat, 22 Apr 2017 20:55:31 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hello,

I'm facing an issue with using nano on Ubuntu Linux through PuTTY on Windows. I need to copy and paste a few lines of a configuration file into the file in the editor. Naturally the file uses Unix line endings (LF only) because it can also be copied over directly. Unfortunately, the two line ending characters, CR and LF, have the corresponding key input ^M and ^J. Now while ^M (CR) is actually documented to insert a new line (which is exactly what the Enter key does), ^J (LF) does not do the same thing, or nothing at least, but instead it messes up the document by removing some line breaks over the place.

Interestingly, LF, the Unix line ending, causes justify, whereas CR, that alone is the Mac OS classic line ending, causes a new line. CR and LF, Windows line ending, would do both. I don't understand why the thing isn't broken everywhere but actually seems to work for interactive Linux users.

So I need a way to permanently disable or remap the ^J hotkey. How does that work? I'm not interested in justify, this is a simple text editor, not a word processor.

In the current state, I cannot use nano to maintain server config files through SSH. I'm not sure how to solve this otherwise. I don't want to go back to vim, and I have no experience with emacs. Are there other editors that are similarly easy to use as nano but don't have this major issue?

Actually I can't remember having this trouble before. Is justify (with that hotkey) a new feature that was added with Ubuntu 16.04? Or even later through a security update?

Yves

PS: Please CC me because I'm not subscribed to the list. (Mailing lists are too complicated to use for single use.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]