emacs: New keybindings for windmove.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 28 Apr 2008 13:42:40 +0000 (14:42 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 28 Apr 2008 13:42:40 +0000 (14:42 +0100)
The S-left etc. bindings don't work well in terminals.  Define new
bindings for C-x w left/down/up/right; and C-x w h/j/k/l.

emacs

diff --git a/emacs b/emacs
index d54e866..bae4138 100644 (file)
--- a/emacs
+++ b/emacs
 
 (trap
   (windmove-default-keybindings)
+  (global-set-key [?\C-x ?w left] 'windmove-left)
+  (global-set-key [?\C-x ?w ?h] 'windmove-left)
+  (global-set-key [?\C-x ?w up] 'windmove-up)
+  (global-set-key [?\C-x ?w ?k] 'windmove-up)
+  (global-set-key [?\C-x ?w down] 'windmove-down)
+  (global-set-key [?\C-x ?w ?j] 'windmove-down)
+  (global-set-key [?\C-x ?w right] 'windmove-right)
+  (global-set-key [?\C-x ?w ?l] 'windmove-right)
   (setq windmove-wrap-around t))
 (trap (iswitchb-mode))
 (global-set-key [?\M-#] 'calc-dispatch)