jed-users mailing list

[2012 Date Index] [2012 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

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


John E. Davis wrote:
> Facundo Bianco <facundo@xxxxxxxxxxxx> 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
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l


[2012 date index] [2012 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]