Emacs:如何阻止绝地?

时间:2014-06-12 12:36:38

标签: emacs emacs-jedi

我经常使用jedi.el,效果很好。但我不知道如何阻止它!

我用jedi:setup手动调用它(打开jedi-mode)并尝试用jedi-mode停止它,但它没有效果。这是不方便的,它会妨碍yasnippet。

你有解决方案吗?感谢。

config:emacs24和melpa的最新jedi.el版本。 jedi:show-setup-info的结果:

;; Emacs Lisp version:
(:emacs-version "24.3.1" :jedi-version "0.2.0alpha2" :python-environment-version "0.0.2alpha0")
;; Python version:
((:version "2.7.3 (default, Feb 27 2014, 19:58:35) \n[GCC 4.6.3]" :name "sys" :file nil)
 (:version "0.7.0" :name "jedi" :file "/usr/local/lib/python2.7/dist-packages/jedi/__init__.pyc")
 (:version "0.0.5" :name "epc" :file "/usr/local/lib/python2.7/dist-packages/epc/__init__.pyc")
 (:version "0.0.3" :name "sexpdata" :file "/usr/local/lib/python2.7/dist-packages/sexpdata.pyc"))
;; Command line:
(:virtualenv "/usr/bin/virtualenv" :virtualenv-version "1.7.1.2\n")
;; Customization:
((jedi:complete-on-dot)
 (jedi:doc-display-buffer . display-buffer)
 (jedi:doc-hook view-mode)
 (jedi:doc-mode . rst-mode)
 (jedi:environment-root)
 (jedi:environment-virtualenv)
 (jedi:get-in-function-call-delay . 1000)
 (jedi:get-in-function-call-timeout . 3000)
 (jedi:goto-definition-config
  (nil nil nil)
  (t nil nil)
  (nil definition nil)
  (t definition nil)
  (nil nil t)
  (t nil t)
  (nil definition t)
  (t definition t))
 (jedi:goto-definition-marker-ring-length . 16)
 (jedi:imenu-create-index-function . jedi:create-nested-imenu-index)
 (jedi:import-python-el-settings . t)
 (jedi:install-imenu)
 (jedi:install-python-jedi-dev-command "pip" "install" "--upgrade" "git+https://github.com/davidhalter/jedi.git@dev#egg=jedi")
 (jedi:key-complete .
                    [C-tab])
 (jedi:key-goto-definition .
                           [67108910])
 (jedi:key-goto-definition-pop-marker .
                                      [67108908])
 (jedi:key-related-names . "r")
 (jedi:key-show-doc . "d")
 (jedi:server-args)
 (jedi:server-command "python" "/home/vdardelx/.emacs.d/elpa/jedi-20140321.1323/jediepcserver.py")
 (jedi:setup-keys)
 (jedi:tooltip-method pos-tip popup)
 (jedi:use-shortcuts)
 (python-environment-default-root-name . "default")
 (python-environment-directory . "~/.emacs.d/.python-environments")
 (python-environment-virtualenv "virtualenv" "--system-site-packages" "--quiet"))

1 个答案:

答案 0 :(得分:1)

哪些方面与yasnippet相冲突?是autocomplete-mode的使用吗? (这似乎是运行jedi:setup的另一个广泛后果,并且在jedi-mode被禁用时不会再次关闭。)

M-x autocomplete-mode会再将其关闭,或在代码中调用(autocomplete-mode -1)

您可以编写一个功能来同时禁用这两种模式,并调用它来关闭jedi。一个更强大的方法会记住启用jedi时自动完成模式的状态,以便之后恢复它,但听起来这对你的情况并不重要。