[Jed-users-l] bash keyboard shortcuts in jed

Facundo Bianco facundo at esdebian.org
Tue Feb 28 18:17:47 UTC 2012


John E. Davis wrote:
> Facundo Bianco <facundo at esdebian.org> wrote:
> > Hi, I want to emute bash keyboard shortcuts [0] for bindings as ^u and
> > ^w. For first, I can make a function that uses "beg_of_line" and then
> > "emacs_yp_kill_line", and for ^w I can rebind with "yp_bkill_word". But
> > my question is: is there a way to use "yp_bkill_word" and when I lauch
> > "smart_set_mark_cmd", rebind ^w to use "yp_kill_region"?
> >
> > 0. http://www.hypexr.org/bash_tutorial.php#emacs
> 
> If you want Ctrl-U to kill to the beginning of the current line, then
> you can use:
> 
>    define yp_kill_to_bol ()
>    {
>        push_mark ();
>        bol ();
>        yp_kill_region ();
>    }
> 
> For the Ctrl-W key, try:
> 
>    define yp_bkill_word_or_region ()
>    {
>       if (is_visible_mark ())
>         yp_kill_region ();
>       else
>         yp_bkill_word ();
>    }

Many thanks John! Works perfectly. 

-- 
Facundo Bianco
irc: vando
http://van.do


More information about the Jed-users-l mailing list