Monday, August 16, 2010

Shortcut nuisance

I started wondering what the bash (or rather libreadline with emacs key bindings) command was for deleting the next word (already making extensive use of ^u, ^w and the like).
bind -P| less is a big helper here, http://www.bigsmoke.us/readline/shortcuts is also.

My revelation now was finally realising that few of the keystrokes work on mac the same way as usual because the option key is not meta; meta is provided escape. So instead of Alt+b i actually want Esc+b.

I now have several options all of which suck:

  • I can turn option into meta in the terminal app which will cause me to loose my Umlauts (I use a selfbuilt kind of US-Alt-Intl keyboard layout)
  • I can let it as it is but then i have to remember the press escape along every time (escape seems the only special key that does not autorepeat). Btw i use http://pqrs.org/macosx/keyremap4macbook/extra.html to make caps lock escape which really helps here and in vim.
  • I could switch to iTerm which is as pretty as terminal when choosing the same fonts and then adapting http://ninjamonkeys.co.za/2007/07/19/iterm-tip-to-get-forward-alt-f-and-backward-alt-b-word-working/ to get all alt combinations to work but this only worked for half of those 
  • There is also something that looked like the answer to my prayers: a hacked iTerm that has a (mac) normal right option key and a (linux/unix-like) normal left option key (aka alt) (or v.v.). Unfortunately my Umlauts then only work in vim and not in bash. I don't know where this is coming from and i don't know how to go about debugging this. 

BTW Terminator doesn't do any of this right so forget it. (UPDATE: MacWise as well)
I think I will go with 1.

What annoys me most is that in all Cocoa apps these shortcuts have identical meaning to term/bash but only the ones using the control work. Why?

If someone has a workaround please tell me.
My Requirements:
I like my umlauts on right alt + Key, I'd love emacs binding to work with the left alt and if possible i'd love them to work in every Cocoa app.

No comments:

Post a Comment