Which will make `C-x o` invoke a transient version of `other-window' like `text-scale-adjust’ does.
1. Fewer keystrokes for multi windows navigation
2. Reduce the probability of RSI
3. Able to navigate windows backwards
(defcustom transient-other-window nil)
(defun other-window-backward ()
(interactive)
(other-window -1))
(defun transient-other-window ()
(interactive)
(let ((echo-keystrokes nil))
(other-window 1)
(set-transient-map
(let ((map (make-sparse-keymap)))
(define-key map "o" #'other-window)
(define-key map "O" #'other-window-backward)
map)
t)))
(if transient-other-window
(global-set-key (kbd "C-x o") #'transient-other-window)
(global-set-key (kbd "C-x o") #'other-window))