alternative keybindings for text mode emacs
Stefan Bund [Tue, 7 May 2013 11:05:47 +0000 (13:05 +0200)]
setup/windmove.el

index e463ba0..3793802 100644 (file)
@@ -1,5 +1,12 @@
 (require 'windmove)
-(global-set-key (kbd "S-<left>") 'windmove-left)
-(global-set-key (kbd "S-<right>") 'windmove-right)
-(global-set-key (kbd "S-<up>") 'windmove-up)
-(global-set-key (kbd "S-<down>") 'windmove-down)
+
+(if window-system
+    (progn
+      (global-set-key (kbd "S-<left>") 'windmove-left)
+      (global-set-key (kbd "S-<right>") 'windmove-right)
+      (global-set-key (kbd "S-<up>") 'windmove-up)
+      (global-set-key (kbd "S-<down>") 'windmove-down))
+  (global-set-key (kbd "C-c <left>") 'windmove-left)
+  (global-set-key (kbd "C-c <right>") 'windmove-right)
+  (global-set-key (kbd "C-c <up>") 'windmove-up)
+  (global-set-key (kbd "C-c <down>") 'windmove-down))