- Subject: Re: [jed-users] Suggestion for the replace-function
- From: Guenter Milde <milde@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Sep 2016 07:51:39 +0200
On 20.09.16, Manfred Hanke wrote:
> assuming that you use the emacs keybinding Alt + % (or ESC, %),
> you probably need something like this in your ~/.jedrc:
> > unsetkey("\e%");
> > setkey("push_spot;replace_cmd;pop_spot", "\e%");
Actually, "unsetkey" is not required here, as the "setkey" overwrites the
old binding.
(Unsetkey is required, if you want a longer key-combination, e.g.
unsetkey("\e%");
setkey("push_spot;replace_cmd;pop_spot", "\e%a");
setkey("replace_cmd", "\e%b");
)
> Although I have to admit that I'm never sure about the difference
> between setkey and definekey, I found the following to work for me
> at runtime (pasted as an S-Lang command, i.e., via Alt + Shift + X
> [or ESC, Shift + X] or menu System -> S-Lang Command), too:
> > definekey("push_spot;replace_cmd;pop_spot", "\e%", what_keymap);
You can also write a new function
define replace_and_come_back()
{
push_spot();
replace_cmd();
pop_spot();
}
and bind this to your "replace-key-combo". (untested)
Günter
_______________________________________________
For list information, visit <http://jedsoft.org/jed/mailinglists.html>.
[2016 date index]
[2016 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]