On Thu, Nov 25, 2010 at 11:22 PM, James Bowlin <[email protected]>wrote:

> On Thu, Nov 25, 2010 at 10:41 PM, SanskritFritz said:
> > What I actually would like the most is that ctrl-left/right would
> > jump on words, and alt-left/right would traverse the history in fish.
> > I dont care about console switching, i have Alt-F1/F2 etc for that.
>
> When you say "history" do you mean directory history or command history?
>

Directory history, but you figured it later I see.


> The general solution is to use loadkeys to map $meta left/right to
> either Meta_$LETTER or Control_$LETTER and then use fish's bind to
> bind that key combo to the command you want.  In bind use:
>
>    \c$LETTER for ctrl-$LETTER
>    \e$LETTER for alt-$LETTER
>
> > Step 2: Edit custom-keymap
> > >    2.a: Change every instance of Decr_Console to Meta_b
> > >    2.b: Change every instance of Incr_Console to Meta_f
> > This way alt-left/right works as word jump, but not as history
> > back/forward (when the fish command line is empty). I care more about
> > the latter, do you know how to get that work?
>
> Oops.  My bad.  I just checked word jumping and assumed it would also
> go through the directory history.  This is easy to fix with bind. Here
> are the bind commands you need:
>
>    bind \ef nextd-or-forward-word
>    bind \eb prevd-or-backward-word
>

I fully got now what you are proposing. This actually introduces a problem
with other program which might act on alt-f or alt-b. Also, in irssi for
example the alt-left/right are important key combos, and this way they get
lost this way.
So, why is this not working then:
keycode 105 = Left
        alt     keycode 105 = Meta_Left
keycode 106 = Right
        alt     keycode 106 = Meta_Right
What I'm trying to do is bind alt-left to, surprise, alt-left, and the same
with alt-right in the console. If that worked I wouldnt have the need of
changing binds in fish.
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to