[Top][All Lists]

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

Re: [Help-nano] Disable justify on ^J

From: Benno Schulenberg
Subject: Re: [Help-nano] Disable justify on ^J
Date: Sun, 23 Apr 2017 12:53:57 +0200

Hello Yves,

On Sat, Apr 22, 2017, at 20:55, Yves Goergen wrote:
> So I need a way to permanently disable or remap the ^J hotkey.
> How does that work?

Very succinctly:

    man nanorc | grep -A2 "unbind key"

So in your /etc/nanorc (or /root/.nanorc or /home/user/.nanorc)
on the server, add this line:

unbind ^J main

> I'm not interested in justify, this is a simple text editor, 
> not a word processor.

Well... the origin of nano lies in pico, which was used mainly for
composing emails, and some people like to neatly "justify" their
paragraphs after editing them, hence the existence of ^J.

> In the current state, I cannot use nano to maintain server config files 
> through SSH. I'm not sure how to solve this otherwise.

If the two files are on the same server, you could open both
of them with nano at the same time, mark in the one file the
piece you want to copy, use M-6 to copy it, use M-> to switch
to the other file, and paste it into place with ^U.

> Are there other editors that are similarly easy to use as nano
> but don't have this major issue?

Don't know.  I've never used putty, so never encountered the issue.

> Actually I can't remember having this trouble before.

It has something to do with putty and the precise terminal emulator
you are using.  Copying and pasting something on a Linux box will
magically "convert" line endings to ^Ms.  Putty sometimes does not.

> Is justify (with that hotkey) a new feature that was added with
> Ubuntu 16.04?

No.  It is very old, from before nano 1.0, because Pico has it.

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

Not complicated, but cumbersome, I agree.  :)


-- - Access all of your messages and folders
                          wherever you are

reply via email to

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