1

jedi:goto-definition 效果很好,但它会在我正在编辑的同一个缓冲区中打开定义。对于仅查找引用,如果它在拆分窗格中打开函数的定义并保留光标会更好在哪儿。

有没有一种简单的方法可以做到这一点?

4

1 回答 1

1

您可以建议jedi:goto-definitionEmacs 在运行之前拆分帧jedi:goto-definition,然后再返回到您的缓冲区。

(defadvice jedi:goto-definition (around definition-in-other-window activate)
  "Goto definition in a different window."
  (interactive)
  ;; remove any current frame splits
  (delete-other-windows)
  ;; split the frame vertically
  (split-window-right)
  ;; switch focus to the window on the right
  (other-window 1)
  ad-do-it
  ;; switch back to the window on the left
  (other-window 1))
于 2013-05-15T15:37:47.790 回答