如何将 cider-switch-to-repl-buffer 正确绑定到 <C-tab>?

How to properly bind cider-switch-to-repl-buffer to <C-tab>?

我试过了

(eval-after-load 'cider
  '(progn
     (define-key cider-mode-map (kbd "<C-tab>") 'cider-switch-to-repl-buffer)
     (define-key cider-repl-mode-map (kbd "<C-tab>") 'cider-switch-to-repl-buffer)))

但它只适用于缓冲区,即我可以从缓冲区切换到 repl,但反过来不行。我想要实现的是使用 C-tab 在缓冲区和 repl 之间来回切换。

谢谢!

我觉得你要在repl中绑定的函数是cider-switch-to-last-clojure-buffer,eg

(with-eval-after-load "cider-mode"
  (define-key cider-repl-mode-map (kbd "<C-tab>")
    'cider-switch-to-last-clojure-buffer))