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

John E. Davis davis at space.mit.edu
Tue Feb 28 17:22:03 UTC 2012


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 ();
   }

--John


More information about the Jed-users-l mailing list