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?
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
Don't pick key combos that you normally use for other things.
> 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
The other commands you might want to bind to are:
prevd
nextd
forward-word
backward-word
up-or-search
down-or-search
You can:
$ funced fish_default_key_bindings
$ funcsave fish_default_key_bindings
then leave fish and enter it again. Sometimes funced is awkward.
Once you've done the funcsave, you can edit the file directly at:
~/.config/fish/functions/fish_default_key_bindings.fish
Now I can get my custom bindings out of fish_prompt.fish :)
Peace, James
------------------------------------------------------------------------------
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