help-nano
[Top][All Lists]
Advanced

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

Re: Help Line Text


From: address@hidden
Subject: Re: Help Line Text
Date: Fri, 21 Feb 2020 17:55:29 +0000 (UTC)

(Please CC me into replies; I am not subscribed to the mailing list.)

Dear all,

Thank you very much, Benno, I will implement your solution.

By the way, what exactly do I need to type into the .nanorc file to rebind something to the escape key?

As for the prompts that include "Text", I understand that they have a history from Pico, and perhaps they could be changed by default in the future if enough people agree they are a bit redundant. I can always change them for myself, as you pointed out.

As for reordering the shortcuts and perhaps displaying different ones in different orders in the help lines, I thought it would be nice to only display the shortcuts I rarely use there.

As I mentioned before, I rebound my most commonly used shortcuts to what I have already memorised, but the other ones which I rarely use I left on default.

For instance, it would be much more useful for me to see prompts on the help lines such as "^T Spell Check", or "M-B Syntax Check" (the ones which I rarely use and have not memorised) so that I can use them when I need them, instead of seeing help for things that I already know.

Reordering them would come as part of customising the prompts; for example, having checks in the first column, or maybe putting the ones I most frequently use on the left, or perhaps even being able to add a custom number of help lines for the remainder of shortcuts I have not memorised.

I apologise for being too vague in my previous message, and I hope I cleared up exactly what I meant.

I have taken what you wrote on board and you successfully changed my mind:

> There is already an interface for modifying .nanorc file: nano itself.  :)

made me chuckle. :)

Please correct me if I am wrong with anything here.

Thank you very much, indeed.
Have a great day!

Alan.
:)

On Fri, 21 Feb 2020 at 3:39 pm, Benno Schulenberg
<address@hidden> wrote:

Hello Alan,

[CC'ing you in case you're not subscribed.  Please answer only to the list.]

Op 21-02-2020 om 02:38 schreef address@hidden:
> Is it possible to change the text in the two help lines at the bottom of the screen?

There is a way, but it's not straightforward.  Nano is internationalized,
so almost all of its messages can be translated.  This translation mechanism
also allows to simply reword nano's texts.  But... it's quite a bit of work.

First you must find out where your nano looks for its MO file. Run
'strace nano 2>TRAIL' and exit right away.  Then 'grep nano.mo TRAIL'.
The first path where it looks for the nano.mo file probably gives an
ENOENT.  Then that is where you want to create a new MO file.

Then get nano's current POT file:
  https://translationproject.org/POT-files/nano-4.8-pre1.pot

Rename that file to something like 'customized-nano.en.po'.
Then open the file with nano and search for the "Read File" msgid.
Change the corresponding msgstr (which is empty), to "Open".
Search for and change all other strings you want to change.
Then run: 'msgfmt -cv customized-nano.en.po'.  This produces
a messages.mo file.  Then you 'sudo cp -v' this messages.mo
to the full path that the 'grep nano.mo TRAIL' showed first,
probably something like:
  /usr/share/locale/en_US/LC_MESSAGES/nano.mo

When you then run nano, all the changes you made should be
there.

> [...] not to mention that GNU nano is a text editor, so it
> is a bit redundant to mention that the shortcut will cut/paste "Text".

Those were inherited from Pico: for nearly twenty years, nano
has more or less faithfully copied the exact look of Pico.
But I agree that those texts could be shortened/improved.

> Perhaps the
> help line text could be changed in the .nanorc file in the future (feature request)?

No.  That is too niche.  You are the first to ask for this.
And, for people that really want this, there is already a
mechanism for this: using the translation MO files.

> Please allow me to get ahead of myself for a minute, but could a settings menu
> inside nano be a good idea?

It would probably look cool.  But...  No.  A preferences or settings menu
is more something for a graphical program.  Nano is a command-line tool.

> Would such a thing be implementable with ncurses,

Sure.

> and be an interface to modify the .nanorc file?

There is already an interface for modifying .nanorc file: nano itself.  :)
That is what nano is mainly used for: to make quick edits to config files.


> Perhaps changing exactly what appears
> in the help lines could be a nice feature, and maybe even reordering the
> shortcuts in the help lines could be useful?


In which order would you prefer to see the shortcuts in the help lines?
And for whom?  How would this be helpful?

Benno


reply via email to

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