I'm using Emacs
on OS X
from mac ports
. By default I have Ctrl as Control
key, and ⌘ Command as Meta
key. Thogh, this is quite handy, I'm missing possibility to move cursor one word backward/forward by pressing M-arrrow key
, i.e. ⌘+← to move one word forward. What I realy want to have:
- ⌥+← move 1 word backward
- ⌥+→ move 1 word forward
- ⌘+← move to 1st non-whitespace charachter of the line
- ⌘+→ move to the line end
- while in all other cases ⌘ ≡ Meta
I tryed to use in my mappings (kbd "A-left")
, "\A-left"
, but this does not worked for me. So, two questions here:
UPDATED
- how to create mapping for ⌥
Option
key?
(setq mac-option-modifier 'hyper)
;; now you can easily use mappings with Hyper key modifier
- how to cerate mapping to arrow keys?
(define-key evil-insert-state-map (kbd "<H-left>") 'left-word)
;; defines Hyper+left arrow combination