emacs-devel
[Top][All Lists]
Advanced

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

Re: Concern about new binding.


From: Jean Louis
Subject: Re: Concern about new binding.
Date: Fri, 12 Feb 2021 12:17:54 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* Kévin Le Gouguec <kevin.legouguec@gmail.com> [2021-02-05 01:03]:
> Thibaut Verron <thibaut.verron@gmail.com> writes:
> 
> >> - I wouldn't find it outlandish for Magit to do something similar to
> >>   rg.el: provide a function (say magit-enable-default-bindings) that
> >>   users can call in their init file to easily setup some bindings under
> >>   a prefix (that would default to C-c g).
> >
> > So to be clear, we would ask hundreds/thousands/whatever of users to
> > add a change to their init file and possibly change a binding they use
> > daily, in order to either make room for, or override a binding they
> > mostly never asked for?
> 
> I've used Magit daily for years, and I call magit-status through C-x g
> dozens of times an hour.  It is very much ingrained in my muscle memory,
> and it would take me a lot of frustrating misinputs to retrain myself to
> use another binding.

You could upgrade the muscle memory and just switch to C-c g or
something else. When I was playing with prefixes I have discovered
that I just have to split memorizing the prefix and letters behind and
whatever prefix I change or introduce I can use it again with those
letters behind.

I have just tried it and changed my favorit prefix from `s-p' to `C-c
p' and I do not even think about the `C-p p' when invoking it, that
goes fast as I have put `C-c p' in the prefix slot of the muscle
memory and all other keys in the map slot of the muscle memory. I have
no other way to express me but that is about how it is.

I could change prefix to F5 and have the same effect. Try it out.

Here is how I have defined my map.

(define-prefix-command 'cf-map)
(global-set-key (kbd "s-p") 'cf-map)

but then today I have changed it to:

(global-set-key (kbd "C-c p") 'cf-map)

and

(global-set-key (kbd "<f5>") 'cf-map)

and I can equally and without problems invoke {<f5> j} to find people
by their phone number or {C-c p j} to do the same.

So now I just need to know one time, like 1 second to remember what is
the prefix. It does not matter, I can now press {C-c p j} to find
people in the database by using the phone number ot {C-c p L} to list
all the recently entered people into the database. It may look complex
or sound complex. My practical use case is simple. Switching from
prefix to prefix is easy for me.

Try it out. Excercise few times. Maybe you discover something new.

Jean



reply via email to

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