@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

Emacsでウィンドウのフォーカスを移動するキーバインド

順方向を C-;、逆方向を S-C-;すなわちC-:にすると便利。

もともとother-windowをC-;に割り当てていて、隣のウィンドウにはワンストロークで移動できていた。
ふと隣り合うウィンドウを行き来するのが面倒(windmoveを利用しているので、シフトキー+カーソルキーとC-;で指の位置が行き来する)になったので、
シフトキー+C-; = C-:(other-window -1)に割り当てたところ便利だった。

(defun counter-other-window ()
  (interactive)
  (other-window -1))
(global-set-key (kbd "C-;") 'other-window)
(global-set-key (kbd "C-:") 'counter-other-window)