Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using oh-my-zsh configuration which has some handy bindkey condiguration. For example: "^[B" backward-word. On Linux I can use it with ease, but on OSX when I press alt-B i get some chars instead moving cursor. Can I configure somehow shortcuts alt+key on OSX or is there any trick to use them of of the box?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

M-b and M-f should be bound to backward-word and forward-word by default:

$ zsh
$ bindkey | grep -- -word  
"^W" backward-kill-word
"^X*" expand-word
"^[^H" backward-kill-word
"^[^_" copy-prev-word
"^[\$" spell-word
"^[." insert-last-word
"^[B" backward-word
"^[C" capitalize-word
"^[D" kill-word
"^[F" forward-word
"^[L" down-case-word
"^[S" spell-word
"^[T" transpose-words
"^[U" up-case-word
"^[_" insert-last-word
"^[b" backward-word
"^[c" capitalize-word
"^[d" kill-word
"^[f" forward-word
"^[l" down-case-word
"^[s" spell-word
"^[t" transpose-words
"^[u" up-case-word
"^[^?" backward-kill-word

You just have to change the meta key:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.