[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
revisiting ^F for Search
From: |
Benno Schulenberg |
Subject: |
revisiting ^F for Search |
Date: |
Sun, 19 Feb 2023 16:56:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 |
Hi all,
Although no one offered me yet a remote login through the browser,
let's assume there is some demand for getting away from the default
^W for Search, even if it's just to avoid new users acquiring the
dangerous habit of typing ^W.
So... the first patch makes ^F an additional keystroke for starting
a forward search, sacrificing the step-one-character-forward keystroke.
As it does not make sense to have a step-backward Ctrl+letter keystroke
when there is no corresponding step-forward keystroke, the patch also
makes ^B start a backward search. And as having M-W for find-next and
M-Q for find-previous are weird when ^F and ^B are used to start searches,
also M-F and M-B are reassigned to do find-next and find-previous.
But... when that patch is applied, probably soon someone will say: why
have ^Q for doing a backward search when ^B now already does that?
Why not make ^Q do Quit/Exit, freeing up ^X to do Cut? Et cetera.
So, the second patch instead adds an option (--hipperkeys), that
changes nano's bindings to be more like what most people know from
modern desktop programs: ^Q for Quit, ^O for Open file, ^F for Find,
^Z for undo, and so on.
The second patch also makes it so that --hipperkeys is activated
when nano's binary starts with the letter "e". This allows using
the newer bindings without having to pass any option by making a
one-time symlink to the nano binary. For example:
cd /usr/local/bin && sudo ln -s nano eta
(The second patch changes only the bindings in the edit window:
the main menu. I haven't yet bothered to make the bindings in
all the submenus consistent/compatible with the main bindings.)
Thoughts?
Benno
control-F-for-Search.patch
Description: Text Data
trendier-bindings-with--hipperkeys.patch
Description: Text Data
OpenPGP_signature
Description: OpenPGP digital signature
- revisiting ^F for Search,
Benno Schulenberg <=