98 |
;; |
;; |
99 |
;; Put the following line in your `.emacs' file: |
;; Put the following line in your `.emacs' file: |
100 |
;; |
;; |
101 |
;; (windmove-default-keybindings) ; default keybindings |
;; (windmove-default-keybindings) ; shifted arrow keys |
102 |
|
;; |
103 |
|
;; or |
104 |
|
;; |
105 |
|
;; (windmove-default-keybindings 'hyper) ; etc. |
106 |
|
;; |
107 |
|
;; to use another modifier key. |
108 |
;; |
;; |
109 |
;; |
;; |
110 |
;; If you wish to enable wrap-around, also add a line like: |
;; If you wish to enable wrap-around, also add a line like: |
116 |
;; causes the occasional creation of a "lost column" between windows, |
;; causes the occasional creation of a "lost column" between windows, |
117 |
;; so that two adjacent windows do not actually touch, you may want to |
;; so that two adjacent windows do not actually touch, you may want to |
118 |
;; increase the value of `windmove-window-distance-delta' to 2 or 3: |
;; increase the value of `windmove-window-distance-delta' to 2 or 3: |
119 |
;; |
;; |
120 |
;; (setq windmove-window-distance-delta 2) |
;; (setq windmove-window-distance-delta 2) |
121 |
;; |
;; |
122 |
|
|
595 |
;; probably want to use different bindings in that case. |
;; probably want to use different bindings in that case. |
596 |
|
|
597 |
;;;###autoload |
;;;###autoload |
598 |
(defun windmove-default-keybindings () |
(defun windmove-default-keybindings (&optional modifier) |
599 |
"Set up default keybindings for `windmove'." |
"Set up keybindings for `windmove'. |
600 |
|
Keybindings are of the form MODIFIER-{left,right,up,down}. |
601 |
|
Default MODIFIER is 'shift." |
602 |
(interactive) |
(interactive) |
603 |
(global-set-key [(shift left)] 'windmove-left) |
(unless modifier (setq modifier 'shift)) |
604 |
(global-set-key [(shift up)] 'windmove-up) |
(global-set-key (vector (list modifier 'left)) 'windmove-left) |
605 |
(global-set-key [(shift right)] 'windmove-right) |
(global-set-key (vector (list modifier 'right)) 'windmove-right) |
606 |
(global-set-key [(shift down)] 'windmove-down)) |
(global-set-key (vector (list modifier 'up)) 'windmove-up) |
607 |
|
(global-set-key (vector (list modifier 'down)) 'windmove-down)) |
608 |
|
|
609 |
|
|
610 |
(provide 'windmove) |
(provide 'windmove) |