# HG changeset patch # User Oleksandr Gavenko # Date 1420326417 -7200 # Node ID ff114571717151cc93ada55ad34ccd02a9fd0536 # Parent fe95fd8f763ba49d15b5d0bab2f6e18210efa71f Use Win key to make buffer switching faster and avoid key binding intersection with term-mode. diff -r fe95fd8f763b -r ff1145717171 .emacs-my --- a/.emacs-my Tue Dec 30 13:07:39 2014 +0200 +++ b/.emacs-my Sun Jan 04 01:06:57 2015 +0200 @@ -861,6 +861,8 @@ (global-set-key [?\C-x right] 'next-buffer) (global-set-key [?\C-x left] 'previous-buffer) +(global-set-key [s-right] 'next-buffer) +(global-set-key [s-left] 'previous-buffer) (global-set-key (kbd "C-x C-k") 'kill-this-buffer) (defun my-kill-this-buffer-maybe-switch-to-next () "Kill current buffer. Switch to next buffer if previous command @@ -872,10 +874,13 @@ (when (memq cmd (list 'next-buffer this-command)) (next-buffer)))) (global-set-key [?\C-x deletechar] 'my-kill-this-buffer-maybe-switch-to-next) -(global-set-key [?\C-x up] '(lambda () - (interactive) - (other-window -1))) -(global-set-key [?\C-x down] 'other-window) +(defun my--backward-other-window () + (interactive) + (other-window -1)) +(global-set-key [?\C-x up] #'my--backward-other-window) +(global-set-key [?\C-x down] #'other-window) +(global-set-key [s-up] #'my--backward-other-window) +(global-set-key [s-down] #'other-window) (require 'uniquify) (setq uniquify-buffer-name-style 'post-forward)