 ;; Print to printer defined by env var `PRINTER'
 (define-key modi-map (kbd "p")    'ps-print-buffer-with-faces) ;; C-x m p
 
-;; Cycle the buffers in reverse order than what happens with `C-x o`
-(global-set-key (kbd "<C-tab>")   'other-window) ;; alternative shortcut for `C-x o`
-(global-set-key (kbd "C-x O")
-                (lambda ()
-                  (interactive)
-                  (other-window -1)))
+;; (global-set-key (kbd "<C-tab>")   'other-window) ;; alternative shortcut for `C-x o`
+;; ;; Cycle the buffers in reverse order than what happens with `C-x o`
+;; (global-set-key (kbd "C-x O")
+;;                 (lambda ()
+;;                   (interactive)
+;;                   (other-window -1)))
+
+(when (boundp 'setup-ace-window-loaded)
+  (global-set-key (kbd "C-x o")  'ace-window)
+  )
 
 (when (boundp 'setup-dired-loaded)
   ;; Change the default `C-x C-d` key binding from `ido-list-directory'

  ;; replace the emacs default query-replace
  (global-set-key (kbd "M-%")        'anzu-query-replace)
  (global-set-key (kbd "C-c r")      'anzu-replace-at-cursor-thing)
  )

(when (boundp 'setup-visual-regexp-loaded)

(global-set-key (kbd "<C-mouse-4>") 'text-scale-increase) ;; C + wheel-up
(global-set-key (kbd "<C-mouse-5>") 'text-scale-decrease) ;; C + wheel-down

;; Make Alt+mousewheel scroll the other buffer
(global-set-key (kbd "<M-mouse-4>") 'scroll-other-window-down-dont-move-point) ;; M + wheel-up
(global-set-key (kbd "<M-mouse-5>") 'scroll-other-window-up-dont-move-point) ;; M + wheel-down

(global-set-key (kbd "C-c k")     'windmove-up) ;; switch to buffer on top
(global-set-key (kbd "C-c j")     'windmove-down) ;; switch to buffer on bottom
